-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Reform::Rails
doesn't work with Rails 6.1 well
#86
Comments
Maybe a better approach will be |
Tried this idea, seems to work as a monkey patch:
Testing for a class that is only temporarily supposed to be there to serve deprecation warnings seems like a hack, but it does work as a starting point |
@cherbst-2112 thanks for the patch, i added it as an initializer and can confirm that it works well .. at least my tests say so :-) |
What a super annoying bug! 💣 Just ran into it myself. |
Had to apply the patch too, any status updates here? Should I assume this is broken and AM support is going away? |
@tpendragon AM is not going to be dropped in Reform, but we're working on Reform 3 and this fell through the cracks. Will review today with @yogeshjain999 💪 |
Y'all are the best, thank you! |
When using
Reform::Rails
with Rails 6.1, error messages of form can't acquire.This is because
Reform::Contract::Result
expected that error messages areHash
orArray
.https://github.com/trailblazer/reform/blob/bcae40b7405a9ac3ee46507fa2c85acbc997a8c0/lib/reform/result.rb#L37
But in Rails 6.1, error messages are instances of
ActiveModel::DeprecationHandlingMessageArray
(this due to show deprecate message. Ref: rails/rails#32313). So error messages are all ignored.This can fix with convert value to
Array
before checkis_a?(Array)
. But I think that may not a good approach...The text was updated successfully, but these errors were encountered: