small medium large xlarge

Generic-user-small
20 Jul 2008, 15:21
Kyle Murphy (3 posts)

I’m on page 174, right where we add the store layout to the application controller. Then, when I navigate to http://localhost:3000/admin, I get this Exception:

ActionView::ActionViewError in Admin#login

Showing layouts/store.html.erb where line #25 raised:

Couldn’t find template file for admin/_cart in [“C:/Documents and Settings/bah/My Documents/NetBeansProjects/Depot/app/views”]

Extracted source (around line #25):

22:

23: <!- START_HIGHLIGHT -> 24:

25: <%= render(:partial => “cart”, :object => @cart) %> 26:

27: 28: <!- END_HIGHLIGHT ->

This is obviously due to not having _cart.html.erb in the admin view folder, but I would think the book would account for that, so I must be doing something wrong. Help?

Samr_small_pragsmall
21 Jul 2008, 12:21
Sam Ruby (634 posts)

The next printing of the book will have little arrows next to all of the lines that you need to insert. This printing neglected to highlight the insertion of <% if @cart %> and <% end %> around that line.

The full version of that file should look like this:

http://media.pragprog.com/titles/rails3/code/depot_q/app/views/layouts/store.html.erb

You must be logged in to comment