nesquena/rabl — pull request #136 by epall (2011-11-04 16:23:36+00:00)
Title: Consider ActiveRecord::Relation objects to be collections

A not-yet-evaluated AR relation is an instance of ActiveRecord::Relation that doesn't appear to include Enumerable, at least in Rails 3.1. Checking respond_to?(:each) will make it appear as a collection, which it is.

In Ruby don't we generally try to duck type when possible? It seems to me that checking instance_of(Enumerable) is against The Ruby Way.