Integrated Yehuda's new callback code from rails

This commit is contained in:
Peter Gumeson 2009-06-07 02:57:22 -07:00
parent 1c6e073b47
commit dc4787e905
8 changed files with 228 additions and 221 deletions

View file

@ -35,10 +35,10 @@ class WithCastedCallBackModel < Hash
property :run_before_validate
property :run_after_validate
validate_callback :before do |object|
set_callback :validate, :before do |object|
object.run_before_validate = true
end
validate_callback :after do |object|
set_callback :validate, :after do |object|
object.run_after_validate = true
end
end