diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-03-18 15:15:24 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-03-18 15:15:24 +0900 |
commit | cf4f05a7d4a2051cf3593bc7c3a6a216e74e797a (patch) | |
tree | 7db84f1507419c3a906cd7fb89ed8a7d631c8e42 /activerecord/lib/active_record/relation | |
parent | fd16e1a92feed73df70e140880cc17b6e482c846 (diff) | |
download | rails-cf4f05a7d4a2051cf3593bc7c3a6a216e74e797a.tar.gz rails-cf4f05a7d4a2051cf3593bc7c3a6a216e74e797a.tar.bz2 rails-cf4f05a7d4a2051cf3593bc7c3a6a216e74e797a.zip |
Delegate `uniq` to `records`
This fixes CI failure due to 48f3be8c.
`Enumerable#uniq` was introduced since Ruby 2.4. We should delegate
`uniq` to `records` explicitly.
And since b644964b `ActiveRecord::Relation` includes `Enumerable` so
delegating `map` is unneeded.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/delegation.rb | 2 |
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 0612151584..7b704c7e66 100644 --- a/activerecord/lib/active_record/relation/delegation.rb +++ b/activerecord/lib/active_record/relation/delegation.rb @@ -36,7 +36,7 @@ module ActiveRecord # may vary depending on the klass of a relation, so we create a subclass of Relation # for each different klass, and the delegations are compiled into that subclass only. - delegate :to_xml, :encode_with, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join, + delegate :to_xml, :encode_with, :length, :collect, :uniq, :each, :all?, :include?, :to_ary, :join, :[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of, :to_sentence, :to_formatted_s, :as_json, :shuffle, :split, :index, to: :records |