I have a simple Devise registration form with a plugin validatable. It basically works as intended, if the user forgets to enter a name, he redirects them back with a red confirmation.
The problem is that it redirects to the same path in which a successful login should go to the user (i.e. redirects them to /userand does not return to /user/sign_up). If the user then refreshes the page for any reason, they get an error No route matches [GET] "/user".
How can I make the redirection return to the original route /user/sign_upwhen registration fails? I know that I can hack an action createin the registration controller, but when I redirect to the correct route, I lose development check messages.
Update
It seems the problem is how Devise handles respond_with Rails 4 How to overwrite the error response method after the error . It seems like Devise is trying to map the template createto / user, but I still can't override it.
source
share