Merge pull request #786 from metamaps/fix/empty-autocomplete

fix topic autocomplete controller action
This commit is contained in:
Devin Howard 2016-10-19 22:16:26 +08:00 committed by GitHub
commit e2d9b6aef2

View file

@ -22,7 +22,7 @@ class TopicsController < ApplicationController
end
@all= @topics.to_a.concat(@maps.to_a).sort { |a, b| a.name <=> b.name }
render json: autocomplete_array_json(@all)
render json: autocomplete_array_json(@all).to_json
end
# GET topics/:id