When registering and viewing passwords in Devise, if you receive an error message, it redirects you to the parent page.
So, on the registration page ( /users/sign_up ), if you get an error message, it redirects you / users and shows an error.
On the forgotten password page ( /users/password/new ), if you receive an error message, it redirects you to /users/password and displays an error.
How can I change it so that it does the same as the icon page, if there is an error, it stays on the same page and shows the error.
I looked through Devise and cannot find where the redirect is.
Here are my routes for Devise:
devise_for :users, :skip => [:sessions] as :user do get 'signin' => 'devise/sessions#new', :as => :new_user_session post 'signin' => 'devise/sessions#create', :as => :user_session get 'signup' => 'devise/registrations#new', :as => :new_user post 'signup' => 'devise/registrations#create', :as => :create_user_session delete 'signout' => 'devise/sessions#destroy', :as => :destroy_user_session get "/account" => "devise/registrations#edit" end
source share