---
title: "flash对象"
author: "yangbinfc"
date: "2011-01-23T14:45:00Z"
tags: []
slug: "flash"
draft: false
lastmod: "2012-11-04T17:48:05Z"
id: 1715386
url: "https://yangbinfc.iteye.com/blog/1715386"
---

解决传统的web开发中的request 和session 的问题： request重新向后无法使用，session可以但是经常忘记销毁 flash也是利用session的技术实现的，但是他在下次请求来后，会自动销毁清空。

如：flash.message = 'ffffffff' 可以使用&lt;%= flash\[:notice]%&gt; 接受