More convenient callback alias methods

This commit is contained in:
Peter Gumeson 2009-06-07 17:01:21 -07:00
parent 806a79a72a
commit ab362cb32c
5 changed files with 27 additions and 11 deletions

View file

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