From dcc30eaed71a6e36acde3a018e6f1ffd27f72d09 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Mon, 28 Oct 2024 16:00:20 +0900 Subject: [PATCH] activemodel: Add ActiveModel::API (#695) ActiveModel::API has been added since v7.0. refs: https://github.com/rails/rails/pull/43223 --- gems/activemodel/7.0/activemodel-7.0.rbs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gems/activemodel/7.0/activemodel-7.0.rbs b/gems/activemodel/7.0/activemodel-7.0.rbs index 753e4c01..13680671 100644 --- a/gems/activemodel/7.0/activemodel-7.0.rbs +++ b/gems/activemodel/7.0/activemodel-7.0.rbs @@ -1,3 +1,16 @@ +module ActiveModel + module API + extend ActiveSupport::Concern + include ActiveModel::AttributeAssignment + include ActiveModel::Validations + extend ActiveModel::Validations::ClassMethods + include ActiveModel::Conversion + extend ActiveModel::Conversion::ClassMethods + + def persisted?: () -> bool + end +end + module ActiveModel class Error CALLBACKS_OPTIONS: ::Array[:if | :unless | :on | :allow_nil | :allow_blank | :strict]