Adding time zone validation to conference model

This commit is contained in:
ibrahimelbanna 2019-03-17 00:03:42 +02:00
parent edc5a5b4aa
commit dc77795f95

View file

@ -80,7 +80,8 @@ class Conference < ApplicationRecord
:start_hour,
:end_hour,
:ticket_layout,
:organization, presence: true
:organization,
:timezone, presence: true
validates :short_title, uniqueness: true
validates :short_title, format: { with: /\A[a-zA-Z0-9_-]*\z/ }