Permalink
Browse files

added to rdoc for unscope that default_scope wins

  • Loading branch information...
1 parent 2392916 commit b46e6416dc6607545e2dea92e6788986b261357c Neeraj Singh committed May 3, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 activerecord/lib/active_record/relation/query_methods.rb
@@ -340,6 +340,9 @@ def reorder!(*args) # :nodoc:
# 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:

0 comments on commit b46e641

Please sign in to comment.