search_controller.rb 278 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

8
9
  def update
    cookies[:ids] = params[:ids]
10
11

    head :ok
Zac Wood's avatar
Zac Wood committed
12
13
  end
end