mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Unify way of calling include_attribute? in attibutes and association methods.
This commit is contained in:
parent
9eb2e281c6
commit
82f50ef81f
@ -451,7 +451,7 @@ module ActiveModel
|
|||||||
method << " h = {}\n"
|
method << " h = {}\n"
|
||||||
|
|
||||||
_attributes.each do |name,key|
|
_attributes.each do |name,key|
|
||||||
method << " h[:\"#{key}\"] = read_attribute_for_serialization(:\"#{name}\") if send #{INCLUDE_METHODS[name].inspect}\n"
|
method << " h[:\"#{key}\"] = read_attribute_for_serialization(:\"#{name}\") if include?(:\"#{name}\")\n"
|
||||||
end
|
end
|
||||||
method << " h\nend"
|
method << " h\nend"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user