Support forcing the order of rooms in the schedule

This commit is contained in:
Michael Ball 2020-07-16 11:25:20 -07:00
parent 02f0d4a254
commit a9d6faf1a3
6 changed files with 17 additions and 6 deletions

View file

@ -13,6 +13,9 @@ class Room < ApplicationRecord
validates :name, :venue_id, presence: true
validates :size, numericality: { only_integer: true, greater_than: 0 }, allow_nil: true
validates :order, numericality: { only_integer: true, greater_than: 0 }, allow_nil: true
default_scope { order(order: :asc) }
def conference
venue.conference