method
callback
callback(method)
private
Hide source
# File activerecord/lib/active_record/callbacks.rb, line 339 def callback(method) notify(method) callbacks_for(method).each do |callback| result = case callback when Symbol self.send(callback) when String eval(callback, binding) when Proc, Method callback.call(self) else if callback.respond_to?(method) callback.send(method, self) else raise ActiveRecordError, "Callbacks must be a symbol denoting the method to call, a string to be evaluated, a block to be invoked, or an object responding to the callback method." end end return false if result == false end result = send(method) if respond_to_without_attributes?(method) return result end