diff --git a/app/controllers/placements/support/school_suggestions_controller.rb b/app/controllers/placements/support/school_suggestions_controller.rb index 5adebbd5c5..daa7238c64 100644 --- a/app/controllers/placements/support/school_suggestions_controller.rb +++ b/app/controllers/placements/support/school_suggestions_controller.rb @@ -1,11 +1,6 @@ class Placements::Support::SchoolSuggestionsController < Placements::Support::ApplicationController def index - schools = - GiasSchool.where("lower(name) LIKE ?", "%#{query_params}%").or( - GiasSchool.where("postcode LIKE ?", "%#{query_params}%").or( - GiasSchool.where("urn LIKE ?", "%#{query_params}%"), - ), - ) + schools = GiasSchool.search_name_urn_postcode(query_params) render json: schools end