S Ahmed
2012-Mar-06 21:17 UTC
account controller, can I use 2 layouts within the same controller?
My account controller is used for user registration. And when the user signs-in, I have seperate controllers to add/update things and they all inherit from a base controller that set''s the layout to a different layout and it ensures the person is signed in correctly. Now I need to have a page where they edit their account, should I still use the account_controller which I use on the public view of the site, or should I create a different controller that inherits from that base controller for signed in users and just live with the fact that my controller is named differently than the actual model being acted upon? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tim Shaffer
2012-Mar-07 17:56 UTC
Re: account controller, can I use 2 layouts within the same controller?
You can specify a layout that applies only to specific actions in a controller: layout "whatever", :only => [ :some_action ] Check out the guide on layouts for more options: http://guides.rubyonrails.org/layouts_and_rendering.html> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/FRzPa4ZwxUYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.