class SectionsController < ApplicationController def index @sections = Section.all end def show @section = Section.find(params[:id]) @questions = @section.questions.includes(:answer) end end