Methods
A
B
C
H
Included Modules
Class Public methods
after_save(*filters, &blk)
# File activesupport/test/callbacks_test.rb, line 35
def self.after_save(*filters, &blk)
  set_callback(:save, :after, *filters, &blk)
end
before_save(*filters, &blk)
# File activesupport/test/callbacks_test.rb, line 31
def self.before_save(*filters, &blk)
  set_callback(:save, :before, *filters, &blk)
end
callback_object(callback_method)
# File activesupport/test/callbacks_test.rb, line 56
def callback_object(callback_method)
  klass = Class.new
  klass.send(:define_method, callback_method) do |model|
    model.history << [:"#{callback_method}_save", :object]
  end
  klass.new
end
callback_proc(callback_method)
# File activesupport/test/callbacks_test.rb, line 52
def callback_proc(callback_method)
  Proc.new { |model| model.history << [callback_method, :proc] }
end
callback_string(callback_method)
# File activesupport/test/callbacks_test.rb, line 48
def callback_string(callback_method)
  "history << [#{callback_method.to_sym.inspect}, :string]"
end
callback_symbol(callback_method)
# File activesupport/test/callbacks_test.rb, line 40
def callback_symbol(callback_method)
  method_name = :"#{callback_method}_method"
  define_method(method_name) do
    history << [callback_method, :symbol]
  end
  method_name
end
Instance Public methods
history()
# File activesupport/test/callbacks_test.rb, line 65
def history
  @history ||= []
end