Ruby/rails/titleを追加
提供: 初心者エンジニアの簡易メモ
actionごとにtitleを変更
app/views/layouts/application.html.erb
<title><%= !@title.nil? ? @title + " | application1" : "application1" %></title>
test_controller.rb
def index @title = "action1" end