Sort events by time
This commit is contained in:
parent
611277ef67
commit
4babd84439
2 changed files with 5 additions and 1 deletions
|
|
@ -288,6 +288,10 @@ class Event < ApplicationRecord
|
||||||
program.conference
|
program.conference
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def <=>(other)
|
||||||
|
time <=> other.time
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class Program < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def with_registration_open
|
def with_registration_open
|
||||||
select { |e| e if e.registration_possible? }
|
select { |e| e if e.registration_possible? }.sort
|
||||||
end
|
end
|
||||||
|
|
||||||
# All confirmed events of the conference with attribute require_registration
|
# All confirmed events of the conference with attribute require_registration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue