I’m confused by how partials behave with respect to arrays.
Simple Example
I have the following in a view:
render :partial => "foobars", :object => [1, 2, 3]
And in _foobars.html.erb, I have
<%= foobars.size %>
<%= foobars[0] %>
The weird thing is that what gets displayed is “444” and “101”, not “3” and “1”.
Is something special happening because I’m passing in an array?
I think what you want is:
and inside the partial