Unscheduled events added to all events

Unscheduled events added to all events of the schedule
This commit is contained in:
Ana 2016-06-11 00:43:45 +02:00
parent 69043e1549
commit cc031b9f3a
4 changed files with 27 additions and 0 deletions

View file

@ -30,6 +30,10 @@ class Program < ActiveRecord::Base
where.not(start_time: nil).where.not(room: nil).order(start_time: :asc)
end
def unscheduled
confirmed.where('start_time IS NULL OR room_id IS NULL')
end
def highlights
where(state: :confirmed, is_highlight: true)
end