Using Devise, I would like to know if there is a way to remove a particular flash message? (Signed in Successfully).
I care about other msg in the view, so It is just for the signed in and the signed out one. Did I have to overwrite the controller or there is another way?
Thank you!
You just define it to an empty string in your local file. In this case you can see nothing.
Ok!
As Shingara said I define an empty string in devise.en.yml
sessions: signed_in: ''
and I also change a bit the following line (provided by nifty-generators):
<% flash.each do |name, msg| %> <%= content_tag :div, msg, :id => "flash" if msg.length > 0 %> <% end %>
In that way, my css doesn't appear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With