Method: Arel::UpdateManager#group

Defined in:
activerecord/lib/arel/update_manager.rb

#group(columns) ⇒ Object



33
34
35
36
37
38
39
40
41
42
# File 'activerecord/lib/arel/update_manager.rb', line 33

def group(columns)
  columns.each do |column|
    column = Nodes::SqlLiteral.new(column) if String === column
    column = Nodes::SqlLiteral.new(column.to_s) if Symbol === column

    @ast.groups.push Nodes::Group.new column
  end

  self
end