drapergem/draper — pull request #314 by ao140505 (2012-10-20 22:34:28+00:00)
Title: fix bug: unitialized constant NilClassDecorator no need to decorate an empty array anyways

I'm using draper on a project that uses ActiveResource and ran into this problem.

* would like to use implicit version of decorates_assocation
* this works fine because of this line https://github.com/drapergem/draper/blob/master/lib/draper/decorator.rb#L74
* but, if the association returns an empty array, it blows up

For example:

```ruby
#given, Product has_many :attributes
# without draper involved
product.attributes
# => []

# with draper, still no attributes
product = ProductDecorator.find(params[:id])
product.attributes
# => uninitialized constant NilClassDecorator
```