Forum: Ruby on Rails multiple divs in a loop

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
jason (Guest)
on 2006-06-05 04:50
I think i have a simple problem i can't get my brain around :)

How do i pass the arguement "story<%=story.id%>" inside the
visual_effect method?

<% for story in @stories.reverse %>

<p><%=link_to_remote ("Show Comments", :update => story.id, :url =>
{:action => :show_comments, :id => story}, :complete =>
visual_effect(:grow, __________, :duration => 1.0)) %>

<div id="story<%=story.id%>" class="comments_class">
<div id="<%=story.id%>">
</div>
</div>
<% end %>

Any help would be awesome.

Thanks
Chris K. (Guest)
on 2006-06-05 09:14
You probably want: 'story'+story.id.to_s
or even: "story#{story.id}"
jason (Guest)
on 2006-06-06 07:00
Chris K. wrote:
> You probably want: 'story'+story.id.to_s
> or even: "story#{story.id}"

Yes, Thank you :)
This topic is locked and can not be replied to.