method
_define_before_model_callback
rails latest stable - Class:
ActiveModel::Callbacks
_define_before_model_callback(klass, callback)private
No documentation available.
# File activemodel/lib/active_model/callbacks.rb, line 129
def _define_before_model_callback(klass, callback)
klass.define_singleton_method("before_#{callback}") do |*args, **options, &block|
options.assert_valid_keys(:if, :unless, :prepend)
set_callback(:"#{callback}", :before, *args, options, &block)
end
end