aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-08-31 15:49:47 +0930
committerGitHub <noreply@github.com>2017-08-31 15:49:47 +0930
commit7721f23e86782baa758c70dd81de80aa0857ca2c (patch)
tree4a04298847c4c94bcb353080c977691e5bff7840 /activerecord/lib/active_record
parentd81a2ede5916e1d1c0459b5981ba760d423327a2 (diff)
parent39805720361f080a63c1febdbc62fe8246e39ec1 (diff)
downloadrails-7721f23e86782baa758c70dd81de80aa0857ca2c.tar.gz
rails-7721f23e86782baa758c70dd81de80aa0857ca2c.tar.bz2
rails-7721f23e86782baa758c70dd81de80aa0857ca2c.zip
Merge pull request #30377 from keepcosmos/delegate-missing-methods
Delegate :rindex, :slice, :rotate(missing) to 'records'
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/delegation.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb
index 1aa85993ca..c5354bf4e9 100644
--- a/activerecord/lib/active_record/relation/delegation.rb
+++ b/activerecord/lib/active_record/relation/delegation.rb
@@ -39,9 +39,9 @@ module ActiveRecord
# for each different klass, and the delegations are compiled into that subclass only.
delegate :to_xml, :encode_with, :length, :each, :uniq, :to_ary, :join,
- :[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of,
+ :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
:to_sentence, :to_formatted_s, :as_json,
- :shuffle, :split, :index, to: :records
+ :shuffle, :split, :slice, :index, :rindex, to: :records
delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,
:connection, :columns_hash, to: :klass