How to make other controllers use different layouts than the default ones. Thank you. -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
On May 12, 6:22 am, raj <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> How to make other controllers use different layouts than the default > ones. > > Thank you. > > -- > Posted viahttp://www.ruby-forum.com/.Override it? --~--~---------~--~----~------------~-------~--~----~ 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 May 12, 2:26 pm, rinda <akbarh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On May 12, 6:22 am, raj <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > How to make other controllers use different layouts than the default > > ones. > > > Thank you. > > > -- > > Posted viahttp://www.ruby-forum.com/. > > Override it?http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html#M000129 http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
That is quite easy to find in the documentation. Example: in the controller, add this: ''layout layoutname'' On 5/12/07, rinda <akbarhome-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On May 12, 2:26 pm, rinda <akbarh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On May 12, 6:22 am, raj <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > > How to make other controllers use different layouts than the default > > > ones. > > > > > Thank you. > > > > > -- > > > Posted viahttp://www.ruby-forum.com/. > > > > Override it? > > > http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html#M000129 > > > http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html > > > > >-- http://www.web-buddha.co.uk --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> ''layout layoutname'', and if you need a finer-grained control : in the controller : ------------------- .. layout proc {|controller| case controller.action_name when *%w(index list search) then ''many'' else ''one'' end } .. Alain Ravet -------- blog.ravet.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?hl=en -~----------~----~----~----~------~----~------~--~---