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