Forum: Ruby on Rails partials and content_for

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.
8f0cf2bd23a6abd922a654c17efee937?d=identicon&s=25 josh (Guest)
on 2006-04-27 22:30
let's say i've got a partial that looks like this:

<% content_for :foo do -%>
     partial.id
<% end -%>

then the following works:
<%= render :partial => "partial", :collection => @collection %>
<%= @content_for_foo %>

but this does not:
<%= @content_for_foo %>
<%= render :partial => "partial", :collection => @collection %>

is there any way to get my @content_for to show up in the html output
above where the partial is rendered in the rhtml template?

thanks
This topic is locked and can not be replied to.