mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
LazyAssociation#object should not reevaluate reflection values
This commit is contained in:
parent
17d0e6bdb7
commit
a39794df5b
@ -8,6 +8,7 @@ Features:
|
||||
|
||||
Fixes:
|
||||
|
||||
- [#2307](https://github.com/rails-api/active_model_serializers/pull/2307) Falsey attribute values should not be reevaluated.
|
||||
|
||||
Misc:
|
||||
|
||||
|
||||
@ -11,7 +11,8 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def object
|
||||
@object ||= reflection.value(
|
||||
return @object if defined?(@object)
|
||||
@object = reflection.value(
|
||||
association_options.fetch(:parent_serializer),
|
||||
association_options.fetch(:include_slice)
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user