search_controller.rb 243 Bytes
Newer Older
Zac Wood's avatar
Zac Wood committed
1
2
class SearchController < ApplicationController
  def index
3
    @courses = Course.where(subject: params[:q]).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

8
9
  def update
    cookies[:ids] = params[:ids]
Zac Wood's avatar
Zac Wood committed
10
11
  end
end