Flowdock
method

insert

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: InsertManager
insert(fields) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/arel/insert_manager.rb, line 22
    def insert(fields)
      return if fields.empty?

      if String === fields
        @ast.values = Nodes::SqlLiteral.new(fields)
      else
        @ast.relation ||= fields.first.first.relation

        values = []

        fields.each do |column, value|
          @ast.columns << column
          values << value
        end
        @ast.values = create_values(values)
      end
      self
    end
Register or log in to add new notes.