rails中flash[:notice]的问题
来源:互联网 发布:高夫好用么 知乎 编辑:程序博客网 时间:2024/05/08 10:39
我在action1中设置了flash[:notice]值,当点击一个链接跳到另外一个action2的时候,flash[:notice]还会显示,只有再次点击其它的链接,flash[:notice]才会消失。为什么跳出了action1,flash[:notice]还会存在呢?比较奇怪
其它的很多aciton中都会设置flash[:notice]的值,但是一旦跳出该action,flash[:notice]都会消失。
有谁碰到过类似的问题么?请教了
- rails中flash[:notice]的问题
- Rails中Flash
- rails中 flash 和 flash.now的区别
- Notice: Undefined offset的问题
- Rails中使用flash总结
- Rails中使用flash总结
- Rails中使用flash总结
- rails中Flash消息淡出
- ThrowawayObject :在Java中实现Rails里的Flash Message
- PHP Notice: Undefined index: ... 问题的解决方案
- Notice: Undefined index: ... 问题的解决方案
- PHP Notice: Warning: 等问题的解决方案
- Notice: Undefined index: ... 问题的解决方案
- PHP Notice: Undefined index: ... 问题的解决方案
- PHP Notice: Undefined index: ... 问题的解决方案
- PHP Notice: Undefined index: ... 问题的解决方法
- PHP Notice: Undefined index: ... 问题的解决方案
- PHP Notice: Undefined index: ... 问题的解决方法:
- 一种理想的大数据量分页查询方案
- MoveFileEx
- sql统计-关于学生成绩
- Traits技术
- 用javascript动态调整iframe高度
- rails中flash[:notice]的问题
- 表结构信息查询
- 用VC++开发数据库应用程序(一)
- Java调用Oracle存储过程NullPointerException异常
- 读毛泽东语录--真理在此,感悟
- 调试JSP解决TOMCAT缓存问题
- 深入探讨C++中的引用
- jQuery ajax 的datatype
- Java数据结构和算法--链表
flash[:notice] is meant only for redirect action, because the message is only cleared after at the end of redirected view request. So if you don’t redirect the request, and you click on the next request, that message will still be displayed.
But sometimes, we just want to display custom error messages only for current request without the redirection (esp. for non-ActiveRecord error messages). So the option is to use flash.now[:notice]. It clears the flash message at the end of current request (without redirection)