The problem you've run into is that yield blocks have to be filled
before they are called - normally,
with the yields in the layout, everything else from the request will
render first. But since you're calling
content_for in the layout, things aren't working.
The quickest way to do what you're tr
Has Anyone found a solution to this? My setup is like this
layout (pseudo-code)
<%= yield : head %>
<%= render :partial => 'home/menu' %>
<%= yield %>
In my partial I have:
<% content_for :head do %>
someJavaSCript
<% end %>
Some Html blah blah..
And it is not renderin
I've the same problem with content_for and yield. The contect of the
content_for is not inserted in the yeld tag of the layout.
I've upgraded from rails 2.1.2 to 2.2.2.
In the view
<% content_for :footer do %>
footer text here
<% end %>
In the Layout
<%= yield :footer %>
Anyone know what
Have the same problem.
Is it a bug in Rails 2.2? Did they change something with content_for
or capture/concat methods?
-Szymon
On 23 Lis, 17:20, phil <[EMAIL PROTECTED]> wrote:
> I have a partial that has a couple ofcontent_forblocks in it. Thisworksfine
> if I render it from a view that will i
Try: content_for(:cow) { 'moo' }
This: content_for(:cow, 'moo)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To u
I've discovered something else.
If you have an rjs template that loads in a partial:
page.replace_html "current_channel", :partial => "edit_form"
and on that page you have:
_edit_form.rhtml:
function popup() {
alert("way hay");
}
That javascript code is not bei
I have a similar problem. Upgrading to Rails 2.2.2 from 2.1.2 i've
lost all view components that are inserted with content_for.
The content_for call sits inside a view helper, which in turn is used
inside the view (eg http://railscasts.com/episodes/30-pretty-page-title).
If i move the content_for
7 matches
Mail list logo