Dear all, When I used "content_for", I can easily make a page show bot TOC and text. Now I am using "yield", how to do the same thing? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 4/23/07, Magicloud <magicloud.magiclouds-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Dear all, > When I used "content_for", I can easily make a page show bot TOC > and text. Now I am using "yield", how to do the same thing? > > Thanks. >In your partial use contet_for :my_section do end then in your layout yield :my_section I think that should get you out of trouble. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Oh, just like it used to be.... Thanks. Daniel N 写道:> On 4/23/07, Magicloud <magicloud.magiclouds-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Dear all, > > When I used "content_for", I can easily make a page show bot TOC > > and text. Now I am using "yield", how to do the same thing? > > > > Thanks. > > > > In your partial use > > contet_for :my_section do > > end > > then in your layout > > yield :my_section > > I think that should get you out of trouble.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---