problems with render in store.html.erb

Working on Agile web development with rails, 3rd edition.

Every time I put         <%= render(:partial => "cart" , :object => @cart) %> in store.html.erb, it makes a "</div>" disappear(well, it doesn't show up when I check with firebug).

When I take this piece of code out, the display returns to normal. I also tried moving it to the end of the page but it causes other problems, like none of the items in the cart display on the page.

Here's a picture so I can help u guys help me better. If you need more information, just ask.

Thanks in advance

Attachments: http://www.ruby-forum.com/attachment/4760/Screenshot-3.png

Omar Moreno wrote:

Working on Agile web development with rails, 3rd edition.

Every time I put         <%= render(:partial => "cart" , :object => @cart) %> in store.html.erb, it makes a "</div>" disappear(well, it doesn't show up when I check with firebug).

When I take this piece of code out, the display returns to normal. I also tried moving it to the end of the page but it causes other problems, like none of the items in the cart display on the page.

Here's a picture so I can help u guys help me better. If you need more information, just ask.

Thanks in advance

Hi Omar,

I just finished that book, so I'm not a guru at Rails or Ruby, but I'll take a stab at a couple of things. A few things I missed when going through this book was adding:

@cart = find_cart

To the store controller under the Index action. That created a couple of issues for me.

Also, for some odd reason, I had to restart my server over the course of this book when it didn't say anything about having to.

Also just one more thing I forgot to do was to add the prototype library to the javascript tag at the top of the layout. I added :default instead of just that library though because I was messing with some other functions.

Anyway, that's about all I can think of for right now. Hopefully it will help to go back through the check list of little things to check.

--Matt Royer