# Problems with render in store.html.erb

**URL:** <https://www.ruby-forum.com/t/problems-with-render-in-store-html-erb/189327>\
**Category:** Rails\
**Created:** [May 28, 2010, 8:01pm UTC](https://www.ruby-forum.com/t/problems-with-render-in-store-html-erb/189327 "2010-05-28T20:01:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deviated](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@deviated](https://www.ruby-forum.com/u/deviated)\
**Post date:** [May 28, 2010, 8:01pm UTC](https://www.ruby-forum.com/t/problems-with-render-in-store-html-erb/189327/1 "2010-05-28T20:01:03Z")

</div>

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 “” 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

---

<div class="post-metadata">

**Author:** ![deviated](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@deviated](https://www.ruby-forum.com/u/deviated)\
**Post date:** [May 28, 2010, 9:29pm UTC](https://www.ruby-forum.com/t/problems-with-render-in-store-html-erb/189327/2 "2010-05-28T21:29:01Z")

</div>

Omar M. 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 “” 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 R.
