mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
Remove unnecessary dup in ActiveModel::Serializer::Associations#associate
The `_reflections` are duped on `inherited` - no need to `dup` them with each addition.
This commit is contained in:
parent
34e5faa1c4
commit
8ac1f107f4
@ -76,8 +76,6 @@ module ActiveModel
|
|||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def associate(reflection)
|
def associate(reflection)
|
||||||
self._reflections = _reflections.dup
|
|
||||||
|
|
||||||
self._reflections << reflection
|
self._reflections << reflection
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user