module Roda::RodaPlugins::Flash
The flash plugin adds a flash
instance method to Roda
, for typical web application flash handling, where values set in the current flash hash are available in the next request.
With the example below, if a POST request is submitted, it will redirect and the resulting GET request will return ‘b’.
plugin :flash route do |r| r.is '' do r.get do flash['a'] end r.post do flash['a'] = 'b' r.redirect('') end end end