NoMethodError in Devise::Registrations#new
rails 6.0にてユーザーログインページを作成しています。
そこでdeviseのビューファイルの設定を行なっており、
NoMethodError in Devise::Registrations#newなエラーが出てしまいます。
どのようにすれば解決出来ますでしょうか?
NoMethodError in Devise::Registrations#new
Showing /Users/hatotoshiki/projects/cuisine/app/views/devise/shared/_links.html.haml where line #2 raised: undefined method `new_session_path' for #<#<Class:0x00007f8f11532378>:0x00007f8f11530618> Did you mean? tweet_session_path user_session_path Extracted source (around line #2): 1- if controller_name != 'sessions' 2 = link_to "Log in", new_session_path(resource_name), class: 'Button' 3 %br/ 4- if devise_mapping.registerable? && controller_name != 'registrations' 5 = link_to "Sign up", new_registration_path(resource_name), class: 'Button' 6 %br/
該当のソースコード
1- if controller_name != 'sessions'
2 = link_to "Log in", new_session_path(resource_name), class: 'Button'
3 %br/
4- if devise_mapping.registerable? && controller_name != 'registrations'
5 = link_to "Sign up", new_registration_path(resource_name), class: 'Button'
6 %br/
ソースコード
試したこと
ターミナル内には
ActionView::Template::Error (undefined method `new_session_path' for #<#Class:0x00007f8f11532378:0x00007f8f11530618>
Did you mean? tweet_session_path
user_session_path):
1: - if controller_name != 'sessions'
2: = link_to "Log in", new_session_path(resource_name), class: 'Button'
3: %br/
4: - if devise_mapping.registerable? && controller_name != 'registrations'
5: = link_to "Sign up", new_registration_path(resource_name), class: 'Button'
app/views/devise/shared/_links.html.haml:2
app/views/devise/registrations/new.html.haml:5
補足情報(FW/ツールのバージョンなど)
あなたの回答
tips
プレビュー