instance method
arel_attributes_with_values
Ruby on Rails 4.2.9
Since v4.0.13 Last seen in v4.2.9 PrivateSignature
arel_attributes_with_values(attribute_names)
Returns a Hash of the Arel::Attributes and attribute values that have been typecasted for use in an Arel insert/update method.
Parameters
-
attribute_namesreq
Source
# File activerecord/lib/active_record/attribute_methods.rb, line 398
def arel_attributes_with_values(attribute_names)
attrs = {}
arel_table = self.class.arel_table
attribute_names.each do |name|
attrs[arel_table[name]] = typecasted_attribute_value(name)
end
attrs
end
Defined in activerecord/lib/active_record/attribute_methods.rb line 398
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods