Closed Earlopain closed 2 months ago
I also had to notice that proper validations are only available in rails 7.1. I think that's fine, the test matrix will take care of this but its not as nice as I expected it would be.
In older versions it should raise an ArgumentError right? I'm sorta mixed on whether removing the constants in favor of strings+validations is equivalent in protection against fat fingering it, but it's probably ok 👍🏻
Yeah, that's right. You would get an ArgumentError on 6.1 at assign time (i.e. execution.error_type = :fiscarded
). With the validate
option on newer rails you get a proper RecordInvalid
error.
A bit more cleanup now that v4 is released.
Rails 7.2 will deprecate the legacy enum notation but the new one was only introduced in Rails 7.0 so a bit of version introspection is needed here.
I also had to notice that proper validations are only available in rails 7.1. I think that's fine, the test matrix will take care of this but its not as nice as I expected it would be.
There was a duplicate
table_name
inprocess.rb
, I've removed that in the process of this.