aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-04-17 23:30:01 -0500
committerJoshua Peek <josh@joshpeek.com>2008-04-17 23:30:01 -0500
commitcf04e621270bb2e5e9e7971d2c59e73d6797482d (patch)
treeaf14a01cb712d6ade17f39da3a8103d7bf3bfd8c /activemodel/lib/active_model
parent82b4faf81218bbd8916ab559590db236c7f80e46 (diff)
downloadrails-cf04e621270bb2e5e9e7971d2c59e73d6797482d.tar.gz
rails-cf04e621270bb2e5e9e7971d2c59e73d6797482d.tar.bz2
rails-cf04e621270bb2e5e9e7971d2c59e73d6797482d.zip
Tidy up ActiveSupport::Callbacks::CallbackChain instance API.
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/validations.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb
index 503fb10795..3b7b9050be 100644
--- a/activemodel/lib/active_model/validations.rb
+++ b/activemodel/lib/active_model/validations.rb
@@ -7,8 +7,7 @@ module ActiveModel
%w( validate validate_on_create validate_on_update ).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