# Cannot get partial with collections to work

**URL:** <https://www.ruby-forum.com/t/cannot-get-partial-with-collections-to-work/130136>\
**Category:** Rails\
**Created:** [February 25, 2008, 6:47pm UTC](https://www.ruby-forum.com/t/cannot-get-partial-with-collections-to-work/130136 "2008-02-25T18:47:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [February 25, 2008, 6:47pm UTC](https://www.ruby-forum.com/t/cannot-get-partial-with-collections-to-work/130136/1 "2008-02-25T18:47:33Z")

</div>

Hi everyone-

Just learning Rails, and I’m wondering if someone can help me out. I  
have a story controller:

class StoriesController \< ApplicationController

def index  
@stories = Story.find(:all)  
end

end

and an index file to render the index action:

\<%= @stories.size %\> stories so far. # THIS WORKS, I SEE THAT I  
HAVE 2 STORIES

# Stories

\<% render :partial =\> 'story', :collection =\> @stories %\>

and a partial, \_story.html.erb:

- \<%= story.headline %\>

no matter what I try, I do not see the partial render. If do see that  
the variable is good, because I see the number “2” (I have 2 stories  
in the dummy database). Also, If I put static html in the partial,  
still, it doesn’t render. However, if I put some bogus embedded ruby  
in the partial, it causes an error, so I know it’s reading the  
partial.

Any suggestions?

Thanks,  
Dino
