diff options
author | schneems <richard.schneeman@gmail.com> | 2014-06-28 14:57:10 -0500 |
---|---|---|
committer | schneems <richard.schneeman@gmail.com> | 2014-06-28 17:49:40 -0500 |
commit | 0f6b101e09d210cea2494c5d4225760f1951ea67 (patch) | |
tree | 941f345a209ab9efbf55c901e2629a1142da6312 /guides | |
parent | f7e4362011ceb1317fd401125d48d7ccb9a1079c (diff) | |
download | rails-0f6b101e09d210cea2494c5d4225760f1951ea67.tar.gz rails-0f6b101e09d210cea2494c5d4225760f1951ea67.tar.bz2 rails-0f6b101e09d210cea2494c5d4225760f1951ea67.zip |
[ci skip] Fix doc for except
The example showed is `except`, however the method "documented" is `unstop`. Fix to align the docs to the example.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_querying.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 311df3a953..2f7fe6fe98 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -675,9 +675,9 @@ This will return single order objects for each day, but only those that are orde Overriding Conditions --------------------- -### `unscope` +### `except` -You can specify certain conditions to be removed using the `unscope` method. For example: +You can specify certain conditions to be removed using the `except` method. For example: ```ruby Article.where('id > 10').limit(20).order('id asc').except(:order) @@ -688,12 +688,11 @@ The SQL that would be executed: ```sql SELECT * FROM articles WHERE id > 10 LIMIT 20 -# Original query without `unscope` +# Original query without `except` SELECT * FROM articles WHERE id > 10 ORDER BY id asc LIMIT 20 - ``` -You can additionally unscope specific where clauses. For example: +You can additionally call `unscope` to remove a specific where clauses. For example: ```ruby Article.where(id: 10, trashed: false).unscope(where: :id) |