Hi, everyone I’m following along the book, but can’t continue because of a problem. I’m having problems with the partials, instead of rendering the partials rails wants to have an ActiveModel object where it is supposed to render a collection.
ActionView::Template::Error: ‘nil’ is not an ActiveModel-compatible object. It must implement :to_partial_path.
I did everything according to the book but still get this error in the productscontroller, line_itemscontroller and cartscontroller where the partial is to be rendered.
Now before i post the code i wanted to know if there had been changes in rails on partials implemention. I’m using rails 4.2.6 and ruby 2.2.4. The error occurs in the application.html.erb.
Code that is causing the error in main layout: <div id="cart"> <%= render @cart %></div>
thanks in advance…