mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Remove old unneeded code
This commit is contained in:
parent
1eb09476ef
commit
d5308b4d0b
@ -161,8 +161,7 @@ end
|
||||
if associated_data.respond_to?(:to_ary)
|
||||
associated_data.map { |elem| association.build_serializer(elem).serializable_hash }
|
||||
else
|
||||
result = association.build_serializer(associated_data).serializable_hash
|
||||
association.is_a?(Association::HasMany) ? [result] : result
|
||||
association.build_serializer(associated_data).serializable_hash
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user