mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Correct documentation for Base.delete_all. References #1568.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3021 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
d28e9aef5f
commit
090bfcec60
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Correct documentation for Base.delete_all. #1568 [Newhydra]
|
||||
|
||||
* Oracle: test case for column default parsing. #2788 [Michael Schoen <schoenm@earthlink.net>]
|
||||
|
||||
* Update documentation for Migrations. #2861 [Tom Werner <tom@cube6media.com>]
|
||||
|
|
|
@ -513,7 +513,7 @@ module ActiveRecord #:nodoc:
|
|||
|
||||
# Deletes all the records that match the +condition+ without instantiating the objects first (and hence not
|
||||
# calling the destroy method). Example:
|
||||
# Post.destroy_all "person_id = 5 AND (category = 'Something' OR category = 'Else')"
|
||||
# Post.delete_all "person_id = 5 AND (category = 'Something' OR category = 'Else')"
|
||||
def delete_all(conditions = nil)
|
||||
sql = "DELETE FROM #{table_name} "
|
||||
add_conditions!(sql, conditions)
|
||||
|
|
Loading…
Reference in a new issue