Closed chaadow closed 9 months ago
@djezzzl btw I'm going to go ahead and try to add rails 7.1 to the github CI matrix. as well as add a unit test to the presence checker 👍🏼
rebased and squashed
Thank you very much for your contribution!
I'll update a changelog and release it today! Please let me know if you have any more ideas to make this gem more helpful.
Have a great day and the upcoming week!
fixes #215
rails 7.1 recently added this new default configuration option
When set to false ( default in rails 7.1 ) an
if
option is added to the belongs_to option. which makes it not compatible with the currentWEAK_OPTIONS
array.To cover this new case, and as a pre-check, we make sure that we're on rails 7.1.0 minimum as well as the ActiveRecord option (
ActiveRecord.belongs_to_required_validates_foreign_key
) is set to false to mitigate issues with realif
conditions. We also check that the if condition is coupled with amessage
option set torequired
This commit also adds rails 7.1 to the CI matrix.
cc @djezzzl @agrobbin