mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
replaced the pulled code with proper gem-reference
The railtie now automatically makes sure, that the middleware is used, and the included gem better respects the copyright of the used solution.
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
module RequestStore
|
||||
class Middleware
|
||||
def initialize(app)
|
||||
@app = app
|
||||
end
|
||||
|
||||
def call(env)
|
||||
RequestStore.clear!
|
||||
@app.call(env)
|
||||
end
|
||||
end
|
||||
|
||||
def self.store
|
||||
Thread.current[:request_store] ||= {}
|
||||
end
|
||||
|
||||
def self.clear!
|
||||
Thread.current[:request_store] = {}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user