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
1 changed files with 3 additions and 0 deletions

View File

@ -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: