courses_controller.rb 234 Bytes
Newer Older
Zac Wood's avatar
Zac Wood committed
1
class CoursesController < ApplicationController
2
  def show
Zac Wood's avatar
Zac Wood committed
3 4
    # Load the course with the id passed in the URL.
    @course = Course.find_by_id(params[:id])
5
    @sections = @course.course_sections.where(semester: @semester)
Zac Wood's avatar
Zac Wood committed
6 7
  end
end