I am using jquery to load the registration form as a popup. The problem is that I cannot load error messages in a popup.
If I am in an empty registration form, I am redirected to another page where I see an error message.
I looked through github posts but couldn't find the solution I'm looking for.
I created a method in the application helper, so the code is <%= devise_error_messages! %> <%= devise_error_messages! %> in the form helper works correctly.
The auxiliary application code is as follows: -
def devise_error_messages! resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join end
I know that something is wrong with this, but I canβt understand what. Can someone please help me with this.
UPDATE
I think that since errors do not appear in the popup when I click the submit button, there may be a problem creating the registration controller action. Attempts to override the default action for the registration controller for development. Let's see if this works with these changes.
UPDATE 2
Made the changes that I mentioned in the above update, although it does not work, it gives the feeling that I am very close to the solution :)
Still waiting for some help.
Thanks,
source share