I am using devise, submitting all devise forms like sign up, login, forgot password forms in ajax way by adding remote: true. How I can handle displaying error messages and flash messages.
Asked
Active
Viewed 162 times
1 Answers
0
Does this help you out?
Basically, you would send a 401 or similar status back with the response, then handle the error inside your ajax error function. From there you could append to a DOM element and style accordingly.
vinyl
- 490
- 4
- 8
-
For all the actions like registrations, sessions, forgot password, resend confirmation do i need to do the same? ā krishna m Mar 05 '19 at 06:47
-
Iād think you would approach it the same way. You just have to handle errors manually based on the response http status, as opposed to letting devise do it for you. ā vinyl Mar 05 '19 at 07:02