mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix inheritance issues, poison cache if attributes change
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user