I’m using devise and I put the login and sign up forms in the same page, now when I write invalid login details or don’t fill required input data at the sign up form.
I’m redirecting to the /users page if I’m trying to register or to the /users/sign_in if I try to login with the errors i made…
I want to stay in the same page and show the errors in the same page.
how can I do it?
thanks you very much, I need a quick help 🙂
I found the solution to this problem on StackOverFlow some time ago. Here’s what worked for me
and
See original post here
…and think about accepting answer, 50% is a bit low! 😉
===== EDIT =====
If you need to redirect to another page when errors occurs, you’ll have to override controllers (check Devise Wiki or search stackoverflow for howto) but it should look like something like that