Skip to content

Commit

Permalink
Change validation for OJT
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftmarks committed Jan 15, 2025
1 parent eabdd8a commit 7c9d7f0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/models/program.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,5 @@ class Program < ImportableRecord

validates :facility_code, :description, presence: true
validates :program_type, inclusion: { in: PROGRAM_TYPES }
validates :ojt_app_type, inclusion: { in: OJT_APP_TYPES }, if: proc { |p| p.ojt? }

def ojt?
program_type == 'OJT'
end
validates :ojt_app_type, inclusion: { in: OJT_APP_TYPES }, if: proc { |p| p.program_type == 'OJT' }
end

0 comments on commit 7c9d7f0

Please sign in to comment.