Commit dc9634b8 authored by Zac Wood's avatar Zac Wood
Browse files

integrated new filtering w/ front end

parent 90617364
Pipeline #2974 passed with stage
in 2 minutes and 13 seconds
class SearchController < ApplicationController class SearchController < ApplicationController
def index def index
@courses = Course.where(subject: params[:q]).select do |course| @courses = Course.fetch(params).select do |course|
course.course_sections.count.positive? course.course_sections.count.positive?
end end
end end
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<form action="/search" class="form-inline"> <form action="/search" class="form-inline">
<div class="form-group"> <div class="form-group">
<div class="input-group"> <div class="input-group">
<input name="q" type="text" class="form-control" placeholder="Search by CRN, course, professor..." aria-describedby="basic-addon2"> <input name="query" type="text" class="form-control" placeholder="Search by CRN, course, professor..." aria-describedby="basic-addon2">
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-secondary" type="button"> <button class="btn btn-secondary" type="button">
<i class="fas fa-search"></i> <i class="fas fa-search"></i>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment