16 lines
456 B
Ruby
16 lines
456 B
Ruby
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
|
|
@sections = Section.all
|
|
@section = Section.find(params[:id])
|
|
@questions = @section.questions.includes(:answer).order(id: :asc)
|
|
end
|
|
end
|