method
call
call(env)
public
Hide source
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 238 def call(env) if (session = env['rack.session']) && (flash = session['flash']) flash.sweep end @app.call(env) ensure session = env['rack.session'] || {} flash_hash = env[KEY] if flash_hash if !flash_hash.empty? || session.key?('flash') session["flash"] = flash_hash new_hash = flash_hash.dup else new_hash = flash_hash end env[KEY] = new_hash new_hash.close! end if session.key?('flash') && session['flash'].empty? session.delete('flash') end end