Fix inheritance issues, poison cache if attributes change

This commit is contained in:
Sam
2013-03-15 14:13:02 -07:00
parent 46378add65
commit ad1d34b2c4
2 changed files with 36 additions and 0 deletions

View File

@@ -105,6 +105,14 @@ module ActiveModel
define_include_method attr
# protect inheritance chains and open classes
# if a serializer inherits from another OR
# attributes are added later in a classes lifecycle
# poison the cache
define_method :_fast_attributes do
raise NameError
end
end
def associate(klass, attrs) #:nodoc: