app/views/layouts/application.html.erb
<title><%= !@title.nil? ? @title : "application1" %></title>
test_controller.rb
def index @title = "action1" end