class MigrationButton::Middleware
Public Instance Methods
call(env)
click to toggle source
Calls superclass method
# File lib/migration_button/middleware.rb, line 7 def call(env) case env['PATH_INFO'] when /#{MigrationButton.mount_path}/, %r(\A/{0,2}#{::Rails.application.config.assets.prefix}) @app.call env else protected_app_call(env) { super } end end
protected_app_call(env) { || ... }
click to toggle source
# File lib/migration_button/middleware.rb, line 17 def protected_app_call(env) yield.tap do self.class.last_request = nil end