1
0
Fork 0
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:
Neeraj Singh 2013-05-03 01:00:43 -04:00
parent 2392916eab
commit b46e6416dc

View file

@ -340,6 +340,9 @@ module ActiveRecord
# User.where(name: "John", active: true).unscope(where: :name) # User.where(name: "John", active: true).unscope(where: :name)
# == User.where(active: true) # == 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 # 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 # 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: # the order, grouping, etc. when that relation is merged. For example: