mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Fix thread unsafe behavior
This commit is contained in:
parent
127b04ba33
commit
c7e847fc72
@ -347,7 +347,7 @@ module ActiveModel
|
||||
return Enumerator.new {} unless object
|
||||
|
||||
Enumerator.new do |y|
|
||||
self.class._reflections.each do |key, reflection|
|
||||
(@reflections ||= self.class._reflections.deep_dup).each do |key, reflection|
|
||||
next if reflection.excluded?(self)
|
||||
next unless include_directive.key?(key)
|
||||
|
||||
@ -411,6 +411,6 @@ module ActiveModel
|
||||
|
||||
protected
|
||||
|
||||
attr_accessor :instance_options
|
||||
attr_accessor :instance_options, :reflections
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user