aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2013-05-03 01:00:43 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2013-05-03 01:00:43 -0400
commitb46e6416dc6607545e2dea92e6788986b261357c (patch)
tree912fd6ea63466dc6c0e9e11543783e968f4596da /activerecord/lib/active_record/relation
parent2392916eab6ff3c60668dbece09d33dee1bfaa49 (diff)
downloadrails-b46e6416dc6607545e2dea92e6788986b261357c.tar.gz
rails-b46e6416dc6607545e2dea92e6788986b261357c.tar.bz2
rails-b46e6416dc6607545e2dea92e6788986b261357c.zip
added to rdoc for unscope that default_scope wins
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 9fcd2d06c5..d020f1ba52 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -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: