We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 424c043 commit ffda6e6Copy full SHA for ffda6e6
lib/grape_entity/entity.rb
@@ -194,13 +194,15 @@ def nested_exposures_hash
194
end
195
196
def nested_exposures
197
- value = nested_exposures_hash
+ return @nested_exposures unless @nested_exposures.nil?
198
+
199
+ @nested_exposures = {}.merge(nested_exposures_hash)
200
201
if superclass.respond_to? :nested_exposures
- value = superclass.nested_exposures.deep_merge(value)
202
+ @nested_exposures = superclass.nested_exposures.deep_merge(@nested_exposures)
203
204
- value
205
+ @nested_exposures
206
207
208
0 commit comments