search_controller.rb 211 Bytes
Newer Older
Zac Wood's avatar
Zac Wood committed
1
2
class SearchController < ApplicationController
  def index
3
    @courses = Course.where(subject: params[:q], semester: @semester).select do |course|
Zac Wood's avatar
Zac Wood committed
4
      course.course_sections.count.positive?
5
    end
Zac Wood's avatar
Zac Wood committed
6
7
  end
end