aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-03-04 09:06:32 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-03-04 09:06:34 -0300
commit2e28045b487d66cbd5519317ec18a93c65a4d04b (patch)
tree8e8b76b83fe4d883e6060a6fb7dd02e4652f0c94 /activerecord/lib/active_record/relation/query_methods.rb
parent96050e1d73ff97b52f3ef3b79f813b75df615833 (diff)
downloadrails-2e28045b487d66cbd5519317ec18a93c65a4d04b.tar.gz
rails-2e28045b487d66cbd5519317ec18a93c65a4d04b.tar.bz2
rails-2e28045b487d66cbd5519317ec18a93c65a4d04b.zip
Remove .all usage from unscope doc examples [ci skip]
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index ff3853b4d9..e5b1be24f8 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -325,21 +325,21 @@ module ActiveRecord
# This is useful when passing around chains of relations and would like to
# modify the relations without reconstructing the entire chain.
#
- # User.all.order('email DESC').unscope(:order) == User.all
+ # User.order('email DESC').unscope(:order) == User.all
#
# The method arguments are symbols which correspond to the names of the methods
# which should be unscoped. The valid arguments are given in VALID_UNSCOPING_VALUES.
# The method can also be called with multiple arguments. For example:
#
- # User.all.order('email DESC').select('id').where(name: "John")
+ # User.order('email DESC').select('id').where(name: "John")
# .unscope(:order, :select, :where) == User.all
#
# One can additionally pass a hash as an argument to unscope specific :where values.
# This is done by passing a hash with a single key-value pair. The key should be
# :where and the value should be the where value to unscope. For example:
#
- # User.all.where(name: "John", active: true).unscope(where: :name)
- # == User.all.where(active: true)
+ # User.where(name: "John", active: true).unscope(where: :name)
+ # == User.where(active: true)
#
# 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