0

I have an user managed by Devise. I am managing this user in my own views, creating a new user, or updating the existing ones.

I have the following tag in my layout:

<p class="notice"><%= notice %></p>

The problem is that when I update an user, I receive the message "Your account has been updated" (which I want to change). After pressing the link to go back to the Users index the notice is still there. It doesn't clear.

How can I solve that?

Tony
  • 10,088
  • 20
  • 85
  • 139

1 Answers1

0

Maybe you should check your respond_to block in your method, and if the notice is set as a flash notice, you can also manually delete the array of flash message.

flash.delete(:notice)

The following link might be helpful: Devise - Flash Notices

Community
  • 1
  • 1
Marshall Shen
  • 1,323
  • 12
  • 17