Has Anyone found a solution to this? My setup is like this
layout (pseudo-code)
<html>
<head>
<%= yield : head %>
</head>
<body>
<%= render :partial => 'home/menu' %>
<%= yield %>
</body>
</html>
In my partial I have:
<% content_for :head do %>
<script>someJavaSCript</script>
<% end %>
Some Html blah blah..
And it is not rendering the content into my header thats defined in the
partial thats rendered in the layout. I'm using some of the YUI stuff and
I'm bundling the javascript and the html in the same file so it stays
together nice and neat.
Regards,
Stephen Blackstone
On Mon, Jan 26, 2009 at 11:21 AM, Jo Da <[email protected]>wrote:
>
> 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 the problem is?
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---