delete_all(conditions = nil)
Instance Public methods
Deletes the records matching conditions without instantiating
the records first, and hence not calling the destroy method
nor invoking callbacks. This is a single SQL DELETE statement that goes
straight to the database, much more efficient than
destroy_all. Be careful with relations though, in particular
:dependent rules defined on associations are not honored.
Returns the number of rows affected.
Post.delete_all("person_id = 5 A