Pito
2008-Apr-16 19:26 UTC
render arguments :locals and :layout only available on partials?
It looks to me like the :locals and :layout arguments for the render call don''t do anything unless you are rendering a :partial. Is that right or am I misdiagnosing what''s happening to me? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Danimal
2008-Apr-17 03:14 UTC
Re: render arguments :locals and :layout only available on partials?
I think you are right with :locals as that is specifically designed for passing variables into the partial to be used within the local scope of that partial. But :layout is for any render. You can specify a different layout or tell it to use none, i.e. :layout => false http://api.rubyonrails.com/classes/ActionController/Base.html#M000452 -Danimal On Apr 16, 1:26 pm, Pito <pitosa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It looks to me like the :locals and :layout arguments for the render > call don''t do anything unless you are rendering a :partial. > > Is that right or am I misdiagnosing what''s happening to me?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---