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?
On 19 Mar 2008, at 22:31, Eric wrote:
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.
There’s this note in partials.rb which may or may not explain this:
can’t be one of hashes. Normally you’d also just keep domain objects,
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/
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs