My cart model contain line_items. I am working in a cart view.
In a view if i do :
<%= render cart.line_items%>
The _line_item.html.erb partial is rendered. To use another partial, it need a more verbose syntax of render. Before trying to use another partial I want to call my current partial like this :
<%= render :partials => "line_items/_line_item", :collection => cart.line_items %>
It does not work, here is the error :
undefined method `formats' for nil:NilClass
I have tried with and without underscore and a few other syntax. What is wrong in this partial call?