_define_after_model_callback(klass, callback) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/callbacks.rb, line 137
    def _define_after_model_callback(klass, callback) #:nodoc:
      klass.define_singleton_method("after_#{callback}") do |*args, &block|
        options = args.extract_options!
        options[:prepend] = true
        conditional = ActiveSupport::Callbacks::Conditionals::Value.new { |v|
          v != false
        }
        options[:if] = Array(options[:if]) << conditional
        set_callback(:"#{callback}", :after, *(args << options), &block)
      end
    end
Register or log in to add new notes.