mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Repeated sentence moved to a function
program.selected_schedule.event_schedules.order(start_time: :asc) was repeated several times and it has been moved to conference#selected_event_schedules
This commit is contained in:
parent
beb17165a2
commit
3897ec79ca
3 changed files with 12 additions and 9 deletions
|
|
@ -61,6 +61,11 @@ class Program < ActiveRecord::Base
|
|||
before_create :create_difficulty_levels
|
||||
validate :check_languages_format
|
||||
|
||||
# Returns all event_schedules for the selected schedule ordered by start_time
|
||||
def selected_event_schedules
|
||||
selected_schedule.event_schedules.order(start_time: :asc) if selected_schedule
|
||||
end
|
||||
|
||||
##
|
||||
# Checks if blind_voting is enabled and if voting period is over
|
||||
# ====Returns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue