# File lib/enumerated_attribute/integrations/active_record.rb, line 37 def attributes=(attrs, guard_protected_attributes=true) return if attrs.nil? #check the attributes then turn them over attrs.each do |k, v| if self.class.has_enumerated_attribute?(k) unless self.class.enumerated_attribute_allows_value?(k, v) raise InvalidEnumeration, ":#{v.to_s} is not a defined enumeration value for the '#{k.to_s}' attribute", caller end attrs[k] = v.to_s end end super end