0

Is it possible for one view in Rails NOT to have the layout of the other views. How can I do this? It automatically has the header and footer etc of the rest of the views, but I want just one of the views to look very different, and have it's own separate stylesheets, javascripts and layouts, and not have the header and footer of the rest of the pages.

4

1 回答 1

2

You can use the :layout option to tell Rails to use a specific file as the layout for the current action:

render :layout => 'special_layout'
于 2013-04-10T14:53:01.573 回答