Rails4 noticeの書き方(Rails3のflash)
redirect_toでRails3のflashを使ってnoticeを書きたかったが、Rails4ではうまくいかなかった。
Rails4では、flashを使わずに下記のように書くようだ。
# コントローラ redirect_to users_path, :notice => "表示したいメッセージ" # ビュー <%= notice %>
参照:
Register your own flash types [Rails 4 Countdown to 2013] | The Remarkable Labs Blog