As long as the application.rhtml contains:
Code:
<%= @content_for_layout %>
or
At the point where you want your view to be included within the layout, that is just what you will achieve.
That is, Rails automatically displays each view within the layout for the current controller. That layout will contain one of the two bits of code, and it is at that point within the layout, that the view code will be inserted.
Specifying layout 'application' forces the view for the controller to use the layout application.rhtml rather than /layout/controller_name.rhtml
Bookmarks