Class: AffiliationId::Middleware::Rails
- Inherits:
-
Object
- Object
- AffiliationId::Middleware::Rails
- Defined in:
- lib/affiliation_id/middleware/rails.rb
Overview
:nodoc:
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Rails
constructor
A new instance of Rails.
Constructor Details
#initialize(app) ⇒ Rails
Returns a new instance of Rails.
8 9 10 |
# File 'lib/affiliation_id/middleware/rails.rb', line 8 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 |
# File 'lib/affiliation_id/middleware/rails.rb', line 12 def call(env) req = ActionDispatch::Request.new env AffiliationId.current_id = req.request_id @app.call(env) end |