Class: Panda::Core::Admin::Editor::SearchController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Panda::Core::Admin::Editor::SearchController
- Defined in:
- app/controllers/panda/core/admin/editor/search_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
#add_breadcrumb, #authenticate_admin_user!, #authenticate_user!, #breadcrumbs, #current_user, #set_current_request_details, #user_signed_in?
Methods included from Panda::Core::Authorizable
#authorize!, #authorized_for?, #authorized_for_admin_access?, #can?
Instance Method Details
#index ⇒ Object
8 9 10 11 12 |
# File 'app/controllers/panda/core/admin/editor/search_controller.rb', line 8 def index query = params[:search].to_s.strip items = Panda::Core::SearchRegistry.search(query, limit: 10) render json: {success: true, items: items} end |