mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
added to rdoc for unscope that default_scope wins
This commit is contained in:
parent
2392916eab
commit
b46e6416dc
1 changed files with 3 additions and 0 deletions
|
@ -340,6 +340,9 @@ module ActiveRecord
|
|||
# User.where(name: "John", active: true).unscope(where: :name)
|
||||
# == User.where(active: true)
|
||||
#
|
||||
# This method is applied before the default_scope is applied. So the conditions
|
||||
# specified in default_scope will not be removed.
|
||||
#
|
||||
# Note that this method is more generalized than ActiveRecord::SpawnMethods#except
|
||||
# because #except will only affect a particular relation's values. It won't wipe
|
||||
# the order, grouping, etc. when that relation is merged. For example:
|
||||
|
|
Loading…
Reference in a new issue