instance method arel_attributes_with_values

Ruby on Rails 4.2.9

Since v4.0.13 Last seen in v4.2.9 Private

Available in: v4.0.13 v4.1.16 v4.2.9

Signature

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_names req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close