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