method
call
call(env)
public
Hide source
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 253 def call(env) @app.call(env) ensure session = Request::Session.find(env) || {} flash_hash = env[KEY] if flash_hash && (flash_hash.present? || session.key?('flash')) session["flash"] = flash_hash.to_session_value env[KEY] = flash_hash.dup end if (!session.respond_to?(:loaded?) || session.loaded?) && # (reset_session uses {}, which doesn't implement #loaded?) session.key?('flash') && session['flash'].nil? session.delete('flash') end end