Module: Innate::Helper::Flash

### Home Classes Methods

### In Files

- lib/innate/helper/flash.rb

### Methods

- #flash

### Class/Module Index

Quicksearch

- Innate
- Innate::Action
- Innate::Adapter
- Innate::Cache
- Innate::Cache::API
- Innate::Cache::DRb
- Innate::Cache::FileBased
- Innate::Cache::Marshal
- Innate::Cache::Memory
- Innate::Cache::YAML
- Innate::Current
- Innate::Etanni
- Innate::Helper
- Innate::Helper::Aspect
- Innate::Helper::Aspect::SingletonMethods
- Innate::Helper::CGI
- Innate::Helper::Flash
- Innate::Helper::Link
- Innate::Helper::Redirect
- Innate::Helper::Render
- Innate::HelperAccess
- Innate::HelpersHelper
- Innate::LRUHash
- Innate::LogHub
- Innate::Mock
- Innate::Mock::Session
- Innate::Node
- Innate::Optioned
- Innate::Optioned::SingletonMethods
- Innate::Options
- Innate::Request
- Innate::Response
- Innate::Rewrite
- Innate::Route
- Innate::Session
- Innate::Session::Flash
- Innate::SingletonMethods
- Innate::StateAccessor
- Innate::Traited
- Innate::Trinity
- Innate::URLMap
- Innate::View
- Innate::View::ERB
- Innate::View::Etanni
- Innate::View::None
- Logger
- Logger::ColorFormatter
- Object

No matching classes.

# Innate::Helper::Flash

Simple access to session.flash.

Flash is a mechanism using sessions to provide a rotating holder of key/value pairs.

Every request that is made will rotate one step, dropping contents stored two requests ago.

The purpose of this class is to provide an easy way of setting/retrieving from the current flash.

Flash is a way to keep a temporary pairs of keys and values for the duration of two requests, the current and following.

Very vague Example:

On the first request, for example on registering:

    flash[:error] = "You should reconsider your username, it's taken already"
    redirect r(:register)

This is the request from the redirect:

    do_stuff if flash[:error]

On the request after this, flash is gone.

### Public Instance Methods

flash() click to toggle source

Just for convenience

    # File lib/innate/helper/flash.rb, line 31
    def flash
      session.flash
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.