-
Notifications
You must be signed in to change notification settings - Fork 162
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
Rails 5.0.7.2, Deprecation WARNING #403
Comments
Same with Rails 6.1 but for DEPRECATION WARNING: Passing a column to `type_cast` is deprecated and will be removed in Rails 6.2. Rails' deprecation PR is this one: https://github.com/rails/rails/pull/39489/files |
I just made the following change in the def db_true
- value = ::ActiveRecord::Base.connection.type_cast(
- true,
- transition_class.columns_hash["most_recent"],
- )
- ::ActiveRecord::Base.connection.quote(value)
+ true
end
def db_false
- value = ::ActiveRecord::Base.connection.type_cast(
- false,
- transition_class.columns_hash["most_recent"],
- )
- ::ActiveRecord::Base.connection.quote(value)
+ false
end Although the specs still pass, I think this code is important as it was fixing this issue on MySQL, so I'm not sure what's the risks of removing it. There's likely a better solution 🙂 cc/ @thom-oman |
Hi again, @thom-oman! |
Hi @lucascaton, sorry for the delayed reply. I just made this PR and we'll see how the tests do, as you point out it's MySQL that has caused issues with this in the past. My understanding of Arel isn't great but we'll see what the MySQL specs on that branch are saying |
OK they've failed, will try give this a look later today and get all the tests passing. |
Hi @thom-oman, happy new year! Have you had a chance to look at this? Is there anything I can do to help? Thanks! |
Hey @lucascaton happy new year! I'm just waiting on #421 being approved, will poke someone today to have a look! May also give it a sanity check in our monolith, though the Statesman specs should be enough. |
hey @lucascaton this been fixed in version 8! Let us know if there are any problems! :) |
Thanks a lot, @thom-oman! 😃 |
Hello,
When running under Rails 5.0.7.2, we have a lot deprecations warning.
Any ideas how to fix it ?
The text was updated successfully, but these errors were encountered: