Skip to content

Fix Rails 5 .to_prepare deprecation warning #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2016
Merged

Fix Rails 5 .to_prepare deprecation warning #526

merged 1 commit into from
May 10, 2016

Conversation

molawson
Copy link
Contributor

@molawson molawson commented May 5, 2016

Changes

In rails/rails@d3c9d80, ActionDispatch::Reloader.to_prepare (and friends) were moved to ActiveSupport.

For now, they're only issuing a deprecation warning, but they're planning on dropping support in Rails 5.1.

DEPRECATION WARNING: to_prepare is deprecated and will be removed from Rails 5.1 (use ActiveSupport::Reloader.to_prepare instead)

Testing

I didn't have a great way to add a test for this, but the implementation seems pretty straightforward. I've tested that the gem works with an app in development. The app doesn't actually use server rendering, but it does boot and otherwise work great.

In rails/rails@d3c9d80,
ActionDispatch::Reloader.to_prepare (and friends) were moved to
ActiveSupport.
@rmosolgo
Copy link
Member

I think this behavior is covered by this test: https://github.com/reactjs/react-rails/blob/master/test/server_rendered_html_test.rb#L12

And we have a gemfile for Rails 5 (https://github.com/reactjs/react-rails/tree/master/gemfiles), so I'd say we're all clear!

Thanks!

@rmosolgo rmosolgo merged commit 4119e57 into reactjs:master May 10, 2016
@rmosolgo
Copy link
Member

🚢 shipped in 1.7.1!

@molawson
Copy link
Contributor Author

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants