cannot get partial with collections to work

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 <h1>Stories</h1> <ul> <% render :partial => 'story', :collection => @stories %> </ul>

and a partial, _story.html.erb:

<li> <%= story.headline %> </li>

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

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

You need <%= render :partial ... not <% render :partial In general things that are blatantly just going to produce a chunk of html go in <%= blocks

Fred

thanks for the fast reply, i knew i was having some newbie problem!

dino