0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ログインエラー

Posted at

ログインボタンを設定し、ホームからログインに飛ばなくて困っています。
エラーは
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

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?