discourse/app/controllers/search_controller.rb
Robin Ward b9a310f4b1 Search Refactor: Let's use a class to keep track of our state rather
than passing params everywhere. Also make the private API private.
2013-05-22 15:22:06 -04:00

13 lines
288 B
Ruby

require_dependency 'search'
class SearchController < ApplicationController
def query
search = Search.new(params[:term],
guardian: guardian,
type_filter: params[:type_filter])
render_json_dump(search.execute.as_json)
end
end