Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice.

This commit is contained in:
Jeremy Kemper
2010-02-25 09:32:29 -08:00
parent 3a3fa7f817
commit 63a7ef0d74
5 changed files with 23 additions and 7 deletions

View File

@@ -167,7 +167,7 @@ module ActiveRecord
module ClassMethods
def self.extended(base)
base.metaclass.alias_method_chain(:alias_attribute, :dirty)
base.singleton_class.alias_method_chain(:alias_attribute, :dirty)
end
def alias_attribute_with_dirty(new_name, old_name)