You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/controllers/schools_controller.rb

9 lines
205 B

class SchoolsController < ApplicationController
def school_list
q = params[:search] ? params[:search].strip : ""
@schools = School.where("name like ?", "%#{q}%").pluck(:name)
end
end