aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: