My normal dynamic content is added with the yield command, but now I would like to add a partial to my layout as well. The partial will generate some links depending on which layout is this. It works fine at first but when I switch between layouts, all of the links are there. I think Rails caches thems. How can I disable this feature? Or work my way around it? -- 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 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 -~----------~----~----~----~------~----~------~--~---
Upping this. I''d really appreciate some help. :/ -- 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 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 -~----------~----~----~----~------~----~------~--~---
On 10/2/06, RoR newbie <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > My normal dynamic content is added with the yield command, but now I > would like to add a partial to my layout as well. The partial will > generate some links depending on which layout is this. It works fine at > first but when I switch between layouts, all of the links are there. I > think Rails caches thems. How can I disable this feature? Or work my way > around it?I''m not sure that I understand your question, or rather how your having this issue. Is your partial called from within your layouts? or inside another view? There is nothing stopping you from generating a partial in a layout. Just include the partial in your layout like any other partial <%= render :partial => ''my_partial'' :object => some_object -%> This should not be cached unless you have requested that it be cached. There is specific information regarding caching here http://api.rubyonrails.org/classes/ActionController/Caching.html Sorry I couldn''t be more help. Maybe if you could give some more information with your specific case... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hi rails doesn t cache layouts, your problem is likely to be a coding error also for your case i think it is better to have more than 1 layout (ie one layout for a specific set of links) -- Heri R. http://sprinj.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 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 -~----------~----~----~----~------~----~------~--~---