Replace BooleanPresenceValidator with InclusionValidator

The `BooleanPresenceValidator` is causing issues with Ruby 3.2+ YJIT irregularly.

Fixes CODEOCEAN-GQ, fixes CODEOCEAN-GR
This commit is contained in:
Sebastian Serth
2023-01-08 14:10:14 +01:00
parent 0a36751896
commit 5d02251cbb
8 changed files with 14 additions and 36 deletions

View File

@@ -7,8 +7,8 @@ class CommunitySolutionContribution < ApplicationRecord
belongs_to :community_solution
belongs_to :community_solution_lock
validates :proposed_changes, boolean_presence: true
validates :timely_contribution, boolean_presence: true
validates :autosave, boolean_presence: true
validates :proposed_changes, inclusion: [true, false]
validates :timely_contribution, inclusion: [true, false]
validates :autosave, inclusion: [true, false]
validates :working_time, presence: true
end