I tried calling something like this in my view:
<%= render :partial => 'foo', :collection => [{1=>2}, 3] %>
And the partial doesn't seem to be getting the first Hash object in the array.
Anyone else experienced this?
I tried calling something like this in my view:
<%= render :partial => 'foo', :collection => [{1=>2}, 3] %>
And the partial doesn't seem to be getting the first Hash object in the array.
Anyone else experienced this?
There's this note in partials.rb which may or may not explain this:
# NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also just keep domain objects, # like Active Records, in there.
Fred
And the partial doesn't seem to be getting the first Hash object in the array.
This seems relevant:
http://blog.hypsometry.com/archives/2007/10/26/rendering_a_collection_of_things/
- Danny