11 lines
272 B
Ruby
11 lines
272 B
Ruby
class SectionsController < ApplicationController
|
|
def index
|
|
@sections = Section.all.order(id: :asc)
|
|
end
|
|
|
|
def show
|
|
@sections = Section.all
|
|
@section = Section.find(params[:id])
|
|
@questions = @section.questions.includes(:answer).order(id: :asc)
|
|
end
|
|
end
|