提交 4f443486 编写于 作者: R Rafael França

Merge pull request #23782 from kdough/add-array-delegation-methods-to-relation

Add methods back to array delegation from ActiveRecord::Relation
......@@ -37,7 +37,8 @@ def inherited(child_class)
# for each different klass, and the delegations are compiled into that subclass only.
delegate :to_xml, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join,
:[], :&, :|, :+, :-, :sample, :shuffle, :reverse, :compact, to: :to_a
:[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of,
:shuffle, :split, to: :to_a
delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,
:connection, :columns_hash, :to => :klass
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册