Typically, you add more specific versions of pages to sub directories specific to the controller.
That is, if you have a layout application.html.erb that displays a partial header ...
# app/views/layouts/application.html.erb <!doctype html> <html> ... <body> <%= render 'header' %> ...
This will look for the partial header first in app/views/<controller_name>/ , then in app/views/application/ . Thus, the title of your site will be in app/views/application/_header.html.erb , and part of your home part will be in app/views/home/_header.html.erb , and it will just work. Rails would load a more "specific" header.
source share