Skip to content

Commit

Permalink
Remove .all usage from unscope doc examples [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Mar 4, 2013
1 parent 96050e1 commit 2e28045
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions activerecord/lib/active_record/relation/query_methods.rb
Expand Up @@ -325,21 +325,21 @@ def reorder!(*args) # :nodoc:
# 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
Expand Down

0 comments on commit 2e28045

Please sign in to comment.