Skip to content
Browse files

Merge pull request #47 from signpost/master

Allow array indexing of ActiveResource::Collection through delegation
  • Loading branch information...
2 parents 5eed733 + b2fb5da commit c285a028dfcd6bda3eaba41ae20db9cecd3cf267 @guilleiguaran guilleiguaran committed Feb 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/active_resource/collection.rb
View
2 lib/active_resource/collection.rb
@@ -3,7 +3,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_xml, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to_ary, :size, :last, :first, :[], :to => :to_a
# The array of actual elements returned by index actions
attr_accessor :elements

0 comments on commit c285a02

Please sign in to comment.
Something went wrong with that request. Please try again.