Closed msroot closed 8 years ago
Ok the problem it happens when i run rails in development and as i see here https://github.com/steveklabnik/request_store/blob/master/lib/request_store/railtie.rb#L12 is cleaning
ActionDispatch.const_defined?(:Reloader)
But it would be nice if i can explicitly say if i want to clean
if ActionDispatch.const_defined?(:Reloader) &&
ActionDispatch::Reloader.respond_to?(:to_cleanup) &&
!RequestStore.skip_cleanup
ActionDispatch::Reloader.to_cleanup do
RequestStore.clear!
end
end
It should only clean when you call reload!
, i thought.
any updates on this issue?
I haven't used rails 5, so I don't know what's going on.
this is related? W, [2016-03-08T03:04:44.800053 #11389] WARN -- : DEPRECATION WARNING: to_cleanup is deprecated and will be removed from Rails 5.1 (use ActiveSupport::Reloader.to_complete instead). (called from block in class:Railtie at /usr/local/rvm/gems/ruby-2.2.4/bundler/gems/request_store-7993a21200ac/lib/request_store/railtie.rb:11)
Yes, that sounds like it. I would be happy to take a patch to fix this; I'm not sure I'll have time to look until next week.
1.3.1 should have fixed this, give it a try!
@steveklabnik thanks :)
I am trying RequestStore with rails 5 and it seems it doent work