Provide callbacks to be executed before and after the request dispatch.
Methods
Included Modules
Class Public methods
Source: show
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 18 def self.after(*args, &block) set_callback(:call, :after, *args, &block) end
Source: show
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 14 def self.before(*args, &block) set_callback(:call, :before, *args, &block) end
Source: show
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 22 def initialize(app, unused = nil) ActiveSupport::Deprecation.warn "Passing a second argument to ActionDispatch::Callbacks.new is deprecated." unless unused.nil? @app = app end
Instance Public methods
Source: show
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 27 def call(env) run_callbacks :call do @app.call(env) end end