make query ILIKE instead of LIKE for case insensitive searches like google or Google

This commit is contained in:
Brendan McDevitt 2022-04-07 18:48:24 -05:00
parent 5b1cb76e29
commit 5b859c6986

View file

@ -14,7 +14,7 @@ class CnasController < ApplicationController
end
def show_for_orgname
@cnas = Cna.where('organization_name LIKE ?', "%#{params[:organization_name]}%")
@cnas = Cna.where('organization_name ILIKE ?', "%#{params[:organization_name]}%")
render json: @cnas.to_json
end
end