Method: Arel::Crud#compile_delete
- Defined in:
- activerecord/lib/arel/crud.rb
#compile_delete(key = nil, having_clause = nil, group_values_columns = []) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'activerecord/lib/arel/crud.rb', line 36 def compile_delete(key = nil, having_clause = nil, group_values_columns = []) dm = DeleteManager.new(source) dm.take(limit) dm.offset(offset) dm.order(*orders) dm.wheres = constraints dm.key = key dm.group(group_values_columns) unless group_values_columns.empty? dm.having(having_clause) unless having_clause.nil? dm end |