Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

fixing deprecation for Rails 5 #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

confact
Copy link

@confact confact commented May 12, 2016

Rails 5 is in it release candidate and this fix remove the deprecation messages when calling cleanup and prepare in the old way. It is not workable for Rails < 5 though and i am open for suggestion to make it work backwards.

ActionDispatch::Reloader.cleanup!
ActionDispatch::Reloader.prepare!
Rails.application.reloader.reload!
Rails.application.reloader.prepare!
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it just Rails.application.reloader.reload!

Copy link

@imrimt imrimt Dec 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix works for me, including both reload! and prepare!. Of course, since this has not been merged yet so I had to manually change it in the local middleware.rb file. It is important to note that this only works in Rails 5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants