ruby on rails 3 - How to render collection with template in rails3? -
if there _post.html.erb in app/views/posts/, can input <%= render @posts %>
in app/views/posts/index.html.erb , if _post.html.erb file in app/views/users/posts/, how write?
i tried <%= render @posts, :template => 'users/posts/post' %>
, not work.
<%= render :partial => 'users/posts/post', :collection => @posts %>
Comments
Post a Comment