Join in a single validation both Shift date validates statements
This commit is contained in:
@@ -5,9 +5,8 @@ class Poll
|
||||
|
||||
validates :booth_id, presence: true
|
||||
validates :officer_id, presence: true
|
||||
validates :date, presence: true
|
||||
validates :date, presence: true, uniqueness: { scope: [:officer_id, :booth_id, :task] }
|
||||
validates :task, presence: true
|
||||
validates :date, uniqueness: { scope: [:officer_id, :booth_id, :task] }
|
||||
|
||||
enum task: { vote_collection: 0, recount_scrutiny: 1 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user