instance method
_define_around_model_callback
Ruby on Rails 8.1.2
Since v5.2.8.1 PrivateSignature
_define_around_model_callback(klass, callback)
No documentation comment.
Parameters
-
klassreq -
callbackreq
Source
# File activemodel/lib/active_model/callbacks.rb, line 136
def _define_around_model_callback(klass, callback)
klass.define_singleton_method("around_#{callback}") do |*args, **options, &block|
options.assert_valid_keys(:if, :unless, :prepend)
set_callback(:"#{callback}", :around, *args, options, &block)
end
end
Defined in activemodel/lib/active_model/callbacks.rb line 136
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Callbacks