Confusion in iteration F4 (ch 11.4)
Jason Black
1 post
|
The business about making the store layout the default layout for the application is sequenced oddly, in such a way as to generate some confusing errors that aren’t mentioned in the text. If the instructions are followed in the order that the book lists them, then when the user visits localhost:3000/users immediately after putting the layout “store” instruction in application.rb, you get a route error (or at least, I got a route error doing this on Windows). The text should say to remove to unnecessary products.html.erb and users.html.erb BEFORE telling the user to go look at either of those controllers. Also- |
Sam Ruby
196 posts
|
Help me understand where the instructions aren’t clear. Here’s the current text:
This text says that if you visit /users you will see a problem, and what the solution to that problem is. What am I missing? |
Breno Gazzola
1 post
|
I think that the problem is, if we visit the admin page immediately after setting the store layout, we will get the following error:
This is because the hidden cart div is still trying to .items when there is no @cart present. If we look for a solution in the text on the same page we will find this:
However it’s never explained how do we prevent the cart div from being present, only how to add the links. |
Sam Ruby
196 posts
|
The next beta will have little triangles pointing at the
and
lines in the depot_q/app/views/layouts/store.html.erb file excerpt that immediately follows that paragraph. I apologize for the omission. |
4 posts, 3 voices
