do a fuzzy search incase we just wanna do like microsoft/google/one word orgname searches
This commit is contained in:
parent
4881609ee7
commit
5b1cb76e29
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ class CnasController < ApplicationController
|
|||
end
|
||||
|
||||
def show_for_orgname
|
||||
@cna = Cna.find_by(:organization_name => params[:organization_name])
|
||||
render json: @cna.to_json
|
||||
@cnas = Cna.where('organization_name LIKE ?', "%#{params[:organization_name]}%")
|
||||
render json: @cnas.to_json
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue