aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-06-25 22:32:54 -0700
committerYves Senn <yves.senn@gmail.com>2013-06-25 22:32:54 -0700
commit16caf63d32e0a643b7fd5bea2085804f4ec74c8d (patch)
tree1c5d0e9d134cf0a8baafb6574870dae36e42d709
parent96a083b51ed85481b4c917b735b62cfa9927d251 (diff)
parent36c89664f5c460af652837d800bec500b197618f (diff)
downloadrails-16caf63d32e0a643b7fd5bea2085804f4ec74c8d.tar.gz
rails-16caf63d32e0a643b7fd5bea2085804f4ec74c8d.tar.bz2
rails-16caf63d32e0a643b7fd5bea2085804f4ec74c8d.zip
Merge pull request #11109 from wangjohn/moving_pluck_and_ids_to_new_delegate_line
Moving the `pluck` and `ids` methods to their own delegate line.
-rw-r--r--activerecord/lib/active_record/querying.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/querying.rb b/activerecord/lib/active_record/querying.rb
index 3d85898c41..6bee4f38e7 100644
--- a/activerecord/lib/active_record/querying.rb
+++ b/activerecord/lib/active_record/querying.rb
@@ -1,15 +1,16 @@
module ActiveRecord
module Querying
- delegate :find, :take, :take!, :first, :first!, :last, :last!, :exists?, :any?, :many?, :to => :all
- delegate :first_or_create, :first_or_create!, :first_or_initialize, :to => :all
- delegate :find_or_create_by, :find_or_create_by!, :find_or_initialize_by, :to => :all
- delegate :find_by, :find_by!, :to => :all
- delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, :to => :all
- delegate :find_each, :find_in_batches, :to => :all
+ delegate :find, :take, :take!, :first, :first!, :last, :last!, :exists?, :any?, :many?, to: :all
+ delegate :first_or_create, :first_or_create!, :first_or_initialize, to: :all
+ delegate :find_or_create_by, :find_or_create_by!, :find_or_initialize_by, to: :all
+ delegate :find_by, :find_by!, to: :all
+ delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, to: :all
+ delegate :find_each, :find_in_batches, to: :all
delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins,
:where, :preload, :eager_load, :includes, :from, :lock, :readonly,
- :having, :create_with, :uniq, :distinct, :references, :none, :unscope, :to => :all
- delegate :count, :average, :minimum, :maximum, :sum, :calculate, :pluck, :ids, :to => :all
+ :having, :create_with, :uniq, :distinct, :references, :none, :unscope, to: :all
+ delegate :count, :average, :minimum, :maximum, :sum, :calculate, to: :all
+ delegate :pluck, :ids, to: :all
# Executes a custom SQL query against your database and returns all the results. The results will
# be returned as an array with columns requested encapsulated as attributes of the model you call