mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix definition of serializer attributes with multiple calls to attribute instead of one single call to attributes.
This commit is contained in:
@@ -70,7 +70,7 @@ module ActiveModel
|
||||
ActiveModelSerializers.silence_warnings do
|
||||
define_method key do
|
||||
object.read_attribute_for_serialization(attr)
|
||||
end unless respond_to?(key, false) || _fragmented.respond_to?(attr)
|
||||
end unless (key != :id && method_defined?(key)) || _fragmented.respond_to?(attr)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user