Support forcing the order of rooms in the schedule
This commit is contained in:
parent
02f0d4a254
commit
a9d6faf1a3
6 changed files with 17 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue