Integrated Yehuda's new callback code from rails
This commit is contained in:
parent
1c6e073b47
commit
dc4787e905
8 changed files with 228 additions and 221 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue