设计/Rails - 如何删除特定的 Flash 消息?(登录成功) [英] Devise/Rails - How to remove a particular flash message? (Signed in Successfully)

查看:16
本文介绍了设计/Rails - 如何删除特定的 Flash 消息?(登录成功)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Devise,我想知道是否有办法删除特定的 Flash 消息?(登录成功).

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?

谢谢!

推荐答案

您只需将其定义为本地文件中的空字符串.在这种情况下,您什么也看不到.

You just define it to an empty string in your local file. In this case you can see nothing.

这篇关于设计/Rails - 如何删除特定的 Flash 消息?(登录成功)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆