diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-04-17 23:30:01 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-04-17 23:30:01 -0500 |
commit | cf04e621270bb2e5e9e7971d2c59e73d6797482d (patch) | |
tree | af14a01cb712d6ade17f39da3a8103d7bf3bfd8c /activerecord/lib/active_record/validations.rb | |
parent | 82b4faf81218bbd8916ab559590db236c7f80e46 (diff) | |
download | rails-cf04e621270bb2e5e9e7971d2c59e73d6797482d.tar.gz rails-cf04e621270bb2e5e9e7971d2c59e73d6797482d.tar.bz2 rails-cf04e621270bb2e5e9e7971d2c59e73d6797482d.zip |
Tidy up ActiveSupport::Callbacks::CallbackChain instance API.
Diffstat (limited to 'activerecord/lib/active_record/validations.rb')
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 86cda9aa66..7b70f78405 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -285,8 +285,7 @@ module ActiveRecord VALIDATIONS.each do |validation_method| base.class_eval <<-"end_eval" def self.#{validation_method}(*methods, &block) - methods = CallbackChain.build(:#{validation_method}, *methods, &block) - self.#{validation_method}_callback_chain.replace(#{validation_method}_callback_chain | methods) + self.#{validation_method}_callback_chain | CallbackChain.build(:#{validation_method}, *methods, &block) end def self.#{validation_method}_callback_chain |