diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-07-16 17:45:28 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-07-16 17:45:28 -0500 |
commit | 73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa (patch) | |
tree | 2f1601292978a844226e16f3cef428ed760b9eb5 /activerecord/lib/active_record/callbacks.rb | |
parent | 8fe01de2e8753d045408ecde3178ab4e9192bf9a (diff) | |
parent | 90c930f45c5c6766306929241462ffff8f67b86e (diff) | |
download | rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.tar.gz rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.tar.bz2 rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.zip |
Resolved conflict
Diffstat (limited to 'activerecord/lib/active_record/callbacks.rb')
-rwxr-xr-x | activerecord/lib/active_record/callbacks.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 4edc209c65..be2621fdb6 100755 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -50,7 +50,7 @@ module ActiveRecord # # == Inheritable callback queues # - # Besides the overwriteable callback methods, it's also possible to register callbacks through the use of the callback macros. + # Besides the overwritable callback methods, it's also possible to register callbacks through the use of the callback macros. # Their main advantage is that the macros add behavior into a callback queue that is kept intact down through an inheritance # hierarchy. Example: # @@ -262,7 +262,7 @@ module ActiveRecord def valid_with_callbacks? #:nodoc: return false if callback(:before_validation) == false if new_record? then result = callback(:before_validation_on_create) else result = callback(:before_validation_on_update) end - return false if result == false + return false if false == result result = valid_without_callbacks? @@ -293,7 +293,7 @@ module ActiveRecord private def callback(method) - result = run_callbacks(method) { |result, object| result == false } + result = run_callbacks(method) { |result, object| false == result } if result != false && respond_to_without_attributes?(method) result = send(method) |