Module: ActsAsOrderedTree::Adapters::PostgreSQLAdapter::Rails30UpdateAllPatch

Defined in:
lib/acts_as_ordered_tree/adapters/postgresql_adapter.rb

Instance Method Summary collapse

Instance Method Details

#update_all(updates, conditions = nil, options = {}) ⇒ Object


87
88
89
90
91
# File 'lib/acts_as_ordered_tree/adapters/postgresql_adapter.rb', line 87

def update_all(updates, conditions = nil, options = {})
  relation = except(:joins, :where).
      where(:id => select(klass.arel_table[:id]).except(:order, :limit).arel)
  relation.update_all(updates, conditions, options)
end