Method: Arel::Crud#compile_update
- Defined in:
- activerecord/lib/arel/crud.rb
#compile_update(values, key = nil, having_clause = nil, group_values_columns = []) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'activerecord/lib/arel/crud.rb', line 17 def compile_update( values, key = nil, having_clause = nil, group_values_columns = [] ) um = UpdateManager.new(source) um.set(values) um.take(limit) um.offset(offset) um.order(*orders) um.wheres = constraints um.key = key um.group(group_values_columns) unless group_values_columns.empty? um.having(having_clause) unless having_clause.nil? um end |