-
Notifications
You must be signed in to change notification settings - Fork 51
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
rendered_format
is removed in Rails 6.1
#93
Comments
Based on that commit and seeing other repos that have updated to account for the deprecation warning, I think we just need to change this line: rabl-rails/lib/rabl-rails/library.rb Line 28 in 4d3ec11
to do the following instead: format = view.lookup_context.formats.first || :json Note: I'm not sure if that change would work on older Rails versions though. I think this change in that same commit Nick shared backs the above suggestion since the |
The |
Something like this : format = (::Rails::VERSION::STRING >= '6' ? view.lookup_context.formats.first : view.lookup_context.rendered_format) || :json |
Thank you, the warning have been removed in version |
the relevant commit is here
The text was updated successfully, but these errors were encountered: