## Flash Hash
* stores a message in the session data
* clears old message after every request
* Example: `flash[:notice] = "Hello!"`
* keys include: `:notice`, `:error`
```html
<!--within a template file or layout file-->
<% if !flash[:notice].blank? %>
<div class="notice"><%= flash[:notice] %></div>
<% end %>
```
* Create the flash message:
```ruby
# some controller:
def create
#...
flash[:notice] = " HellOOO "
redirect_to(:action => "" )
end
#OR
def create
#...
redirect_to(), :notice => "HIIII"
end
```
* You can pass anything from `alert`, `notice`, `flash`
## Displaying with different alert types
* In your `layouts/application.html.erb` file:
```ruby
<% flash.each do |name, msg| %>
<div class="#{name}"><%= msg %></div>
<% end %>
#name could be alert, notice or flash
#msg is the actual message
```