Permalink
Browse files

Merge pull request #27904 from kenta-s/add-methods-back-to-array-dele…

…gation-from-ar-relation

Delegate `to_sentence` and `to_fomatted_s` to `records`
  • Loading branch information...
eileencodes committed Feb 10, 2017
1 parent 0f338df commit 28a1bdd6fde91781f764677e5178ab17b8439060
@@ -37,6 +37,7 @@ def inherited(child_class)
delegate :to_xml, :encode_with, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join,
:[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of,
:to_sentence, :to_formatted_s,
:shuffle, :split, :index, to: :records
delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,
@@ -32,7 +32,8 @@ module DelegationWhitelistBlacklistTests
:exclude?, :find_all, :flat_map, :group_by, :include?, :length,
:map, :none?, :one?, :partition, :reject, :reverse,
:sample, :second, :sort, :sort_by, :third,
:to_ary, :to_set, :to_xml, :to_yaml, :join
:to_ary, :to_set, :to_xml, :to_yaml, :join,
:in_groups, :in_groups_of, :to_sentence, :to_formatted_s
]
ARRAY_DELEGATES.each do |method|

0 comments on commit 28a1bdd

Please sign in to comment.