The flash provides a way to pass temporary primitive-types (String, Array, Hash) between actions. Anything you place in the flash will be exposed to the very next action and then cleared out.
Since the notice and alert keys are a common idiom, convenience accessors are available:
You can use any idiom like:
Persist flash values against multiple actions:
Now suppose you have three actions say action1, action2 , action3. And you are calling one to another:
Use of keep:
Persisting values just for currect action:
Can’t access these values in next action.
comments powered by