Add basic deadline to sections index

This commit is contained in:
Charlotte Van Petegem 2025-05-25 21:54:34 +02:00
parent 782355322e
commit f4106b9fb6
Signed by: chvp
SSH key fingerprint: SHA256:s9rb8jBVfdahqWHuBAcHCBP1wmj4eYQXZfqgz4H3E9E
15 changed files with 175 additions and 1 deletions

View file

@ -1,6 +1,11 @@
class SectionsController < ApplicationController
def index
@sections = Section.all.order(id: :asc)
@extensions = Extension.all.order(id: :asc)
@deadline = Time.zone.local(2025, 7, 8, 0, 0, 0)
@extensions.each do |e|
@deadline = e.affect_deadline(@deadline)
end
end
def show