From eda8093482c304fb942ac7e16c1df281fc2c0ef5 Mon Sep 17 00:00:00 2001 From: printercu Date: Wed, 2 Oct 2013 13:55:20 +0400 Subject: [PATCH] Collection delegates all Array-instance methods to elements array --- lib/active_resource/collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_resource/collection.rb b/lib/active_resource/collection.rb index dcb4048a56..fcdcb86bc7 100644 --- a/lib/active_resource/collection.rb +++ b/lib/active_resource/collection.rb @@ -4,7 +4,7 @@ module ActiveResource # :nodoc: class Collection # :nodoc: include Enumerable - delegate :to_xml, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to_ary, :size, :last, :first, :[], :to => :to_a + delegate :to_yaml, :all?, *Array.instance_methods(false), :to => :to_a # The array of actual elements returned by index actions attr_accessor :elements, :resource_class, :original_params