aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorMichael Grosser <michael@grosser.it>2016-07-31 18:02:10 -0700
committerMichael Grosser <michael@grosser.it>2016-08-12 19:20:28 -0700
commitb61e9e2ace0cbd547e5da3224f7ec87784b41443 (patch)
tree6f3e36c70e7ed9dd191aa864a4d47640127c66c2 /activerecord
parent815b730b1b79158511f9f4c8465c476b9fe9b7e0 (diff)
downloadrails-b61e9e2ace0cbd547e5da3224f7ec87784b41443.tar.gz
rails-b61e9e2ace0cbd547e5da3224f7ec87784b41443.tar.bz2
rails-b61e9e2ace0cbd547e5da3224f7ec87784b41443.zip
add index to array methods so we can call it on relations
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation/delegation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb
index ad74659cba..a5ad30ab60 100644
--- a/activerecord/lib/active_record/relation/delegation.rb
+++ b/activerecord/lib/active_record/relation/delegation.rb
@@ -38,7 +38,7 @@ module ActiveRecord
delegate :to_xml, :encode_with, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join,
:[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of,
- :shuffle, :split, to: :records
+ :shuffle, :split, :index, to: :records
delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,
:connection, :columns_hash, :to => :klass