Skip to content

Commit 5094e4a

Browse files
committed
observation report: add validate for mission_type
1 parent a3d0c1e commit 5094e4a

File tree

3 files changed

+111
-1
lines changed

3 files changed

+111
-1
lines changed

app/models/observation_report.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ObservationReport < ApplicationRecord
2020

2121
acts_as_paranoid
2222

23-
enum :mission_type, {mandated: 0, semi_mandated: 1, external: 2}, prefix: true, scopes: false
23+
enum :mission_type, {mandated: 0, semi_mandated: 1, external: 2}, prefix: true, scopes: false, validate: true
2424
ransacker :mission_type, formatter: proc { |v| mission_types[v] }
2525

2626
normalizes :title, with: -> { it.strip }

0 commit comments

Comments
 (0)