Rails uses layouts as master templates. By default, you will have one layout template called application , which you can find in app/views/layouts/application.html.erb . If you look at this file, you will see something like:
# app/views/layouts/application.html.erb <html> <head> ... </head> <body> ... <div id="content"> # Your page content will be inserted here: <%= yield %> </div> ... </body> </html>
By default, this will be displayed for all pages, and the contents of each page (fx your new.html.erb ) will be displayed in the yield block.
This means that application.html.erb is the right place, but as a rule, the creation of layouts, such as menus and banners, that should be displayed on all pages.
If you want to have something that changes slightly for each page (fx different banners), you can add a special <%= yield(:banner) if content_for?(:banner) %> to your application.html.erb file. Then you can add a block on each of your pages for such a banner:
# app/views/some_resource/some_page.html.erb <% content_for(:banner) do %> # insert page specifik banner here <% end %> # normal content for page ...
Hope this answers your question?
You can also learn more about layouts (fx, how to use more than one layout) at http://guides.rubyonrails.org/layouts_and_rendering.html
Edit: The correct way to implement content.html.erb
The content of content.html.erb should be:
# What is this? This has nothing to do with stylesheets? <% content_for :stylesheets do %> <div id="divLogin"> </div> <% end %> <div id="divMain"> </div>
So no content_for :MainContent block and not display the layout template 'application.html.erb' (it is not even partial, so you cannot do this).