Class: Para::Admin::SearchController
- Inherits:
-
Para::ApplicationController
- Object
- ActionController::Base
- Para::ApplicationController
- Para::Admin::SearchController
- Includes:
- ModelHelper, SearchHelper
- Defined in:
- app/controllers/para/admin/search_controller.rb
Instance Method Summary collapse
Methods included from SearchHelper
#distinct_search_results, #filtered?, #fulltext_search_param_for, #searchable_attributes
Methods included from ModelHelper
#attribute_field_mappings_for, #excerpt_value_for, #field_for, #field_value_for, #model_field_mappings, #relation_klass_for, #value_for
Methods inherited from Para::ApplicationController
Instance Method Details
#index ⇒ Object
7 8 9 10 11 12 |
# File 'app/controllers/para/admin/search_controller.rb', line 7 def index model = params[:model_name].constantize attributes = model_field_mappings(model).fields @results = model.ransack(fulltext_search_param_for(attributes) => params[:search]).result render layout: false end |