mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user