Skip to content

Commit

Permalink
Merge pull request #11109 from wangjohn/moving_pluck_and_ids_to_new_d…
Browse files Browse the repository at this point in the history
…elegate_line

Moving the `pluck` and `ids` methods to their own delegate line.
  • Loading branch information
senny committed Jun 26, 2013
2 parents 96a083b + 36c8966 commit 16caf63
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions activerecord/lib/active_record/querying.rb
@@ -1,15 +1,16 @@
module ActiveRecord module ActiveRecord
module Querying module Querying
delegate :find, :take, :take!, :first, :first!, :last, :last!, :exists?, :any?, :many?, :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 :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_or_create_by, :find_or_create_by!, :find_or_initialize_by, to: :all
delegate :find_by, :find_by!, :to => :all delegate :find_by, :find_by!, to: :all
delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, :to => :all delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, to: :all
delegate :find_each, :find_in_batches, :to => :all delegate :find_each, :find_in_batches, to: :all
delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins, delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins,
:where, :preload, :eager_load, :includes, :from, :lock, :readonly, :where, :preload, :eager_load, :includes, :from, :lock, :readonly,
:having, :create_with, :uniq, :distinct, :references, :none, :unscope, :to => :all :having, :create_with, :uniq, :distinct, :references, :none, :unscope, to: :all
delegate :count, :average, :minimum, :maximum, :sum, :calculate, :pluck, :ids, :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 # 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 # be returned as an array with columns requested encapsulated as attributes of the model you call
Expand Down

0 comments on commit 16caf63

Please sign in to comment.