module Roda::RodaPlugins::Flash::InstanceMethods
Public Instance Methods
Source
# File lib/roda/plugins/flash.rb, line 93 def flash # :_flash to support transparent upgrades from previous key @_flash ||= FlashHash.new(session['_flash'] || (session['_flash'] = session.delete(:_flash))) end
Access the flash hash for the current request, loading it from the session if it is not already loaded.
Private Instance Methods
Source
# File lib/roda/plugins/flash.rb, line 102 def _roda_after_40__flash(_) if f = @_flash f = f.next if f.empty? session.delete('_flash') else session['_flash'] = f end end end
If the routing doesn’t raise an error, rotate the flash hash in the session so the next request has access to it.