# Imagine that your application requires a layout that differs slightly from your regular application layout to support one particular controller # The solution is nested layout! #inside your different layout controller add: layout 'custom' # app/views/layouts/custom.html.erb <% content_for :stylesheets do %> <%= stylesheet_link_tag "custom" %> <% end %> <% content_for :content do %>
Right menu items here
<%= yield %> <% end %> <%= render "layouts/application" %> # app/views/layouts/application.html.erb My Application <%= stylesheet_link_tag "layout" %>
Top menu items here
<%= content_for?(:content) ? yield(:content) : yield %>