Skip to content

Commit

Permalink
Add PG search to school suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie committed Jan 4, 2024
1 parent 791089c commit 1da5f97
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1da5f97

Please sign in to comment.