ログインボタンを設定し、ホームからログインに飛ばなくて困っています。
エラーは
NameError in Staff::SessionsController#new
undefined method rescue500' for class
#>' Did you mean? rescue rescuer
Extracted source (around line #106):
case rescuer = find_rescue_handler(exception)
when Symbol
method = object.method(rescuer)
if method.arity == 0
-> e { method.call }
else
で、
自身の書いたRoutes.rbは次の通りです。
以前、同じエラーが出た時は、
全く違う箇所の小さなスペルミスだったのですが、
何度見直しても誤記は見つけられません。
ルートが間違っているのでしょうか??
Rails.application.routes.draw do
config = Rails.application.config.baukis2
constraints host: config[ :staff ][ :host ] do
namespace :staff, path: config[ :staff ][ :path ] do
root "top#index"
get "login" => "sessions#new", as: :login
resources :session, only: [ :create, :destroy ]
resources :account, except: [ :new, :create, :destroy ]
end
end
constraints host: config[ :admin ][ :host ] do
namespace :admin, path: config[ :admin ][ :path ] do
root "top#index"
get "login" => "sessions#new", as: :login
resources :session, only: [ :create, :destroy ]
resources :staff_members
end
end
constraints host: config[ :customer ][ :host ] do
namespace :customer, path: config[ :customer ][ :path ] do
root "top#index"
end
end
end