Module: NoBrainer::Criteria::Delete

Extended by:
ActiveSupport::Concern
Defined in:
lib/no_brainer/criteria/delete.rb

Instance Method Summary collapse

Instance Method Details

#delete_allObject



4
5
6
# File 'lib/no_brainer/criteria/delete.rb', line 4

def delete_all
  run { without_distinct.without_ordering.without_plucking.to_rql.delete }
end

#destroy_allObject



8
9
10
# File 'lib/no_brainer/criteria/delete.rb', line 8

def destroy_all
  to_a.each(&:destroy)
end