Using Two Layouts in a Single Rails Controller

Sometimes, whether it is best or not, you run into the issue of having a single controller needing to display two different layouts. I’ve only run into this a hand full of times but it was annoying each time because Rails doesn’t handle it by default. Here is my solution:

This entry was posted in Ruby on Rails. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>