开发者

No flash message with devise

开发者 https://www.devze.com 2023-02-10 15:39 出处:网络
I\'m trying to remove a flash message and I\'m using devise for t开发者_开发知识库he user management. Setting the value to null or an empty string just throws an error in the notice, removing it from

I'm trying to remove a flash message and I'm using devise for t开发者_开发知识库he user management. Setting the value to null or an empty string just throws an error in the notice, removing it from the devise.en.yml gives a similar error.

Removing the notice from erb file isn't an option, I just want it to not display at all. Anyone got any ideas?


You could call flash.discard(:notice) in an after filter of the controller. That should clear the flash message.

0

精彩评论

暂无评论...
验证码 换一张
取 消