Module: SimpleRecord::Callbacks

Included in:
Base
Defined in:
lib/simple_record.rb

Constant Summary collapse

@@callbacks =

this bit of code creates a “run_blank” function for everything value in the @@callbacks array. this function can then be inserted in the appropriate place in the save, new, destroy, etc overrides basically, this is how we recreate the callback functions

["before_validation", "before_validation_on_create", "before_validation_on_update",
"after_validation", "after_validation_on_create", "after_validation_on_update",
"before_save", "before_create", "before_update",
"after_create", "after_update", "after_save",
"after_destroy"]

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



73
74
75
76
# File 'lib/simple_record.rb', line 73

def self.included(base)
    #puts 'Callbacks included in ' + base.inspect

end