fix to_json calls
This commit is contained in:
parent
e6b95ec42b
commit
ce1f0332be
1 changed files with 4 additions and 4 deletions
|
@ -73,7 +73,7 @@ class SearchController < ApplicationController
|
||||||
@topics = []
|
@topics = []
|
||||||
end
|
end
|
||||||
|
|
||||||
render json: autocomplete_array_json(@topics)
|
render json: autocomplete_array_json(@topics).to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
# get /search/maps?term=SOMETERM
|
# get /search/maps?term=SOMETERM
|
||||||
|
@ -107,7 +107,7 @@ class SearchController < ApplicationController
|
||||||
@maps = []
|
@maps = []
|
||||||
end
|
end
|
||||||
|
|
||||||
render json: autocomplete_map_array_json(@maps)
|
render json: autocomplete_map_array_json(@maps).to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
# get /search/mappers?term=SOMETERM
|
# get /search/mappers?term=SOMETERM
|
||||||
|
@ -125,7 +125,7 @@ class SearchController < ApplicationController
|
||||||
else
|
else
|
||||||
@mappers = []
|
@mappers = []
|
||||||
end
|
end
|
||||||
render json: autocomplete_user_array_json(@mappers)
|
render json: autocomplete_user_array_json(@mappers).to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
# get /search/synapses?term=SOMETERM OR
|
# get /search/synapses?term=SOMETERM OR
|
||||||
|
@ -151,7 +151,7 @@ class SearchController < ApplicationController
|
||||||
# limit to 5 results
|
# limit to 5 results
|
||||||
@synapses = @synapses.to_a.slice(0, 5)
|
@synapses = @synapses.to_a.slice(0, 5)
|
||||||
|
|
||||||
render json: autocomplete_synapse_array_json(@synapses)
|
render json: autocomplete_synapse_array_json(@synapses).to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Add table
Reference in a new issue