Merge OSEM updates
This commit is contained in:
commit
d1ca21f479
50 changed files with 338 additions and 382 deletions
|
|
@ -61,6 +61,9 @@ class Conference < ApplicationRecord
|
|||
has_one :email_settings, dependent: :destroy
|
||||
has_one :program, dependent: :destroy
|
||||
has_one :venue, dependent: :destroy
|
||||
delegate :city, :country_name, to: :venue, allow_nil: true
|
||||
delegate :name, :street, to: :venue, prefix: true, allow_nil: true
|
||||
|
||||
has_many :ticket_purchases, dependent: :destroy
|
||||
has_many :physical_tickets, through: :ticket_purchases
|
||||
has_many :payments, dependent: :destroy
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class SurveyQuestion < ActiveRecord::Base
|
|||
|
||||
validates :title, presence: true
|
||||
validates :possible_answers, :max_choices, :min_choices, presence: true, if: :choice?
|
||||
validates :min_choices, numericality: { greater_than_or_equal_to: 1 }, allow_blank: true
|
||||
validates :max_choices, numericality: { greater_than_or_equal_to: 1 }, allow_blank: true
|
||||
validates :min_choices, numericality: { greater_than_or_equal_to: 1 }, allow_blank: true, if: :choice?
|
||||
validates :max_choices, numericality: { greater_than_or_equal_to: 1 }, allow_blank: true, if: :choice?
|
||||
|
||||
validate :max_choices_greater_than_min
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue