Unify way of calling include_attribute? in attibutes and association methods.

This commit is contained in:
Wojciech Wnętrzak 2013-04-20 23:24:44 +02:00
parent 9eb2e281c6
commit 82f50ef81f

View File

@ -451,7 +451,7 @@ module ActiveModel
method << " h = {}\n"
_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
method << " h\nend"