Rails-like 'flash' in Spring

I’m going to document this because it took me ages to work out, but in the end it turned out to be quite easy.

In Rails there is a useful thing called ‘flash’. Flash is a component which is automatically available in every view. Controller classes can insert a message into the flash object, and when it renders the view it can display the message. The great thing is that by default the message exists in the flash for two requests. This is so that the current request can be terminated with a browser redirect, and when the browser follows the redirect the flash message will be there waiting for it.

Read on for more details.

This entry was posted on Thu, 13 Dec 2007 01:56:07 GMT . You can follow any any response to this entry through the Atom feed. You can leave a comment or a trackback from your own site.


Trackbacks

Use the following link to trackback from your own site:
http://evansweb.info/trackbacks?article_id=rails-like-flash-in-spring&day=13&month=12&year=2007

Comments

Leave a response

Leave a comment