class Api::LecturesController < Api::BaseController
  include Garage::RestfulActions
  include Garage::NoAuthentication

  def require_resources
    @resources = Lecture.includes(
        { klass: [:department, :course] }, { wday_periods: [:period] },
        :lecturers
      ).all
  end

  def require_resource
    @resource = Lecture.find(params[:id])
  end
end

class Api::LecturesController < Api::BaseController
  include Garage::RestfulActions
  include Garage::NoAuthentication

  def require_resources
    @resources = Lecture.includes(
        { klass: [:department, :course] }, { wday_periods: [:period] },
        :lecturers
      ).current_term
  end

  def require_resource
    @resource = Lecture.find(params[:id])
  end
end

Apply current_term scope to `GET /api/lectures`
Apply current_term scope to `GET /api/lectures`
