Add validation for email and coc
This commit is contained in:
parent
c7ed538ba8
commit
b0c8b7a60a
1 changed files with 5 additions and 0 deletions
|
|
@ -25,10 +25,15 @@ class Booth < ApplicationRecord
|
|||
:state,
|
||||
:responsibles,
|
||||
:conference_id,
|
||||
:email,
|
||||
:website_url,
|
||||
:submitter_relationship,
|
||||
presence: true
|
||||
|
||||
validates :accepted_code_of_conduct, acceptance: {
|
||||
if: -> { conference.try(:code_of_conduct).present? }
|
||||
}
|
||||
|
||||
scope :accepted, -> { where(state: 'accepted') }
|
||||
scope :confirmed, -> { where(state: 'confirmed') }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue