メモ用。
routes.rbファイルでasオプション
をつけると、名前を指定することができる。
config/routes.rb
get 'exit', to: 'sessions#destroy', as: :logout
名前付きヘルパーとしてlogout_path
とlogout_url
が作成される。
logout_pathを呼び出すと/exitが返される。
Go to list of users who liked
More than 5 years have passed since last update.
メモ用。
routes.rbファイルでasオプション
をつけると、名前を指定することができる。
get 'exit', to: 'sessions#destroy', as: :logout
名前付きヘルパーとしてlogout_path
とlogout_url
が作成される。
logout_pathを呼び出すと/exitが返される。
Register as a new user and use Qiita more conveniently
Go to list of users who liked