discourse/app/controllers/search_controller.rb

11 lines
250 B
Ruby
Raw Normal View History

2013-02-05 14:16:51 -05:00
require_dependency 'search'
class SearchController < ApplicationController
def query
search_result = Search.query(params[:term], params[:type_filter], SiteSetting.min_search_term_length)
render_json_dump(search_result.as_json)
2013-02-05 14:16:51 -05:00
end
end