Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
module RequestStore
class Railtie < ::Rails::Railtie
initializer "request_store.insert_middleware" do |app|
if ActionDispatch.const_defined? :RequestId
app.config.middleware.insert_after ActionDispatch::RequestId, RequestStore::Middleware
else
app.config.middleware.insert_after Rack::MethodOverride, RequestStore::Middleware
end
if ActiveSupport.const_defined?(:Reloader) && ActiveSupport::Reloader.respond_to?(:to_complete)
ActiveSupport::Reloader.to_complete do
RequestStore.clear!
end
elsif ActionDispatch.const_defined?(:Reloader) && ActionDispatch::Reloader.respond_to?(:to_cleanup)
ActionDispatch::Reloader.to_cleanup do
RequestStore.clear!
end
end
end
end
end