aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/callbacks.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-08 17:44:31 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-08 17:44:31 +0000
commitcf6282099d93f929cc08e8c362b085f36811f2cc (patch)
treec03f865bf0fac4f364e5b90ebdf63bbd83232133 /activerecord/lib/active_record/callbacks.rb
parentac4a039a31dc575428b1632b3f07b2da237921ca (diff)
downloadrails-cf6282099d93f929cc08e8c362b085f36811f2cc.tar.gz
rails-cf6282099d93f929cc08e8c362b085f36811f2cc.tar.bz2
rails-cf6282099d93f929cc08e8c362b085f36811f2cc.zip
A fix that actually works...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@91 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/callbacks.rb')
-rwxr-xr-xactiverecord/lib/active_record/callbacks.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb
index 7a95ca6bce..e4987ceb43 100755
--- a/activerecord/lib/active_record/callbacks.rb
+++ b/activerecord/lib/active_record/callbacks.rb
@@ -191,7 +191,7 @@ module ActiveRecord
alias_method :destroy, :destroy_with_callbacks
end
- CALLBACKS.each { |cb| base.class_eval("def self.#{cb}(*methods) write_inheritable_attribute(\"#{cb}\", (read_inheritable_attribute(\"#{cb}\") + methods).uniq) end") }
+ CALLBACKS.each { |cb| base.class_eval("def self.#{cb}(*methods) write_inheritable_array(\"#{cb}\", methods - (read_inheritable_attribute(\"#{cb}\") || [])) end") }
end
module ClassMethods #:nodoc: