Replace Field#included? with Field#excluded?.

This commit is contained in:
Lucas Hosseini
2016-01-13 05:13:20 +01:00
parent 7af198653d
commit 2696557650
3 changed files with 6 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ module ActiveModel
def attributes(requested_attrs = nil, reload = false)
@attributes = nil if reload
@attributes ||= self.class._attributes_data.each_with_object({}) do |(key, attr), hash|
next unless attr.included?(self)
next if attr.excluded?(self)
next unless requested_attrs.nil? || requested_attrs.include?(key)
hash[key] = attr.value(self)
end