Skip to content

Commit

Permalink
Merge pull request #101 from printercu/patch-1
Browse files Browse the repository at this point in the history
Collection delegates all Array-instance methods to elements array
  • Loading branch information
guilleiguaran committed Jan 29, 2014
2 parents c4eb476 + eda8093 commit c665bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_resource/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c665bf3

Please sign in to comment.