【解決したい課題】
新規登録エラー発生時にリロードするとルーティングエラーになる問題を解決したい
【現状】(エラー内容)
新規登録の際にエラー発生した際にルーティングエラーになる
→エラー発生時のみ発生
routes.rb
Rails.application.routes.draw do devise_for :users, controllers: { sessions: "users/sessions", passwords: "users/passwords", registrations: "users/registrations", omniauth_callbacks: "users/omniauth_callbacks" } devise_for :admins, controllers: { sessions: "admins/sessions", passwords: "admins/passwords", registrations: "admins/registrations" } scope module: :public do root to: "homes#top" get "/help" => "homes#help" get "/home" => "homes#home" get "/search" => "homes#search" get "/rank" => "ranks#rank" post "/homes/guest_sign_in" => "homes#guest_sign_in" get "unsubscribe/:name" => "homes#unsubscribe", as: "confirm_unsubscribe" patch ":id/withdraw/:name" => "homes#withdraw", as: "withdraw_user" put "withdraw/:name" => "users#withdraw" resources :notifications, only: [:index] resources :articles do resource :bookmarks, only: [:show, :create, :destroy] resources :comments, only: [:create, :destroy] end resources :users, only: [:show, :edit, :update ] do resource :relationships, only: [:create, :destroy] get "followings" => "relationships#followings", as: "followings" get "followers" => "relationships#followers", as: "followers" end end namespace :admin do resources :users, except: [:new, :create] end end ``` 【対策と自分の考え】 下記URLを参考にroutes.rbを変更しましたが、解決に至りませんでした。 https://github.com/kazuki-kitaguchi/hmw_exhibit/issues/9 https://qiita.com/suin/items/b479000c49d2468a6260
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。