I have this in my route file:
devise_scope :user do
get "/admin", :to => "users/sessions#new"
end
I can access the sing in form by going to http://localhost:3000/admin. When I click on Sign in without providing username and password it redirects me to the /users/sign_in path with error message about missing username and password.
I think it is default behavior of Devise. But on sing in error, I want be redirected to the /admin instead of default /users/sign_id. How can I achieve this behavior?
Thanks in advance.
1 Answer