Module: Roda::RodaPlugins::Flash::InstanceMethods

Defined in:
lib/roda/plugins/flash.rb

Instance Method Summary collapse

Instance Method Details

#flashObject

Access the flash hash for the current request, loading it from the session if it is not already loaded.



93
94
95
96
# 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