Rails 3 - Devise user not clearing notice tag

149 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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