Particles and local variable
If we want to pass a collection to a partial one, we will do the following:
<%= render :partial => "post", :collection => @posts %>
If we want to pass one object to a custom variable, we do the following:
<%= render :partial => "item", :locals => { :item => @advertisement } %>
Now, what should I do to pass the collection , prox it through a custom variable (like the second case)?
+2
source to share