Skip to content

Commit

Permalink
Merge pull request #404 from djones/master
Browse files Browse the repository at this point in the history
Rails 5: ActionDispatch::Reloader#to_prepare is deprecated
  • Loading branch information
kevinhughes27 authored Apr 13, 2017
2 parents 291518a + fae3b24 commit addd46f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion example/config/initializers/shopify_session_repository.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
if Rails.configuration.cache_classes
ShopifyApp::SessionRepository.storage = Shop
else
ActionDispatch::Reloader.to_prepare do
reloader = defined?(ActiveSupport::Reloader) ? ActiveSupport::Reloader : ActionDispatch::Reloader

reloader.to_prepare do
ShopifyApp::SessionRepository.storage = Shop
end
end
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
if Rails.configuration.cache_classes
ShopifyApp::SessionRepository.storage = Shop
else
ActionDispatch::Reloader.to_prepare do
reloader = defined?(ActiveSupport::Reloader) ? ActiveSupport::Reloader : ActionDispatch::Reloader

reloader.to_prepare do
ShopifyApp::SessionRepository.storage = Shop
end
end

0 comments on commit addd46f

Please sign in to comment.