Merge pull request #282 from morgoth/unify-calling-include_attribute

Unify way of calling include_attribute? in attibutes and association methods
This commit is contained in:
Steve Klabnik 2013-04-22 01:31:59 -07:00
commit 2f21e77e90

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"