Class: Kommandant::SearchesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Kommandant::SearchesController
- Defined in:
- app/controllers/kommandant/searches_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/controllers/kommandant/searches_controller.rb', line 2 def index @results = Kommandant::Command.search(params[:query]) unless Kommandant.config.admin_only_filter_lambda.present? && Kommandant.config.admin_only_filter_lambda.call(current_user, current_admin) @results.reject!(&:admin_only?) end end |
#new ⇒ Object
10 11 |
# File 'app/controllers/kommandant/searches_controller.rb', line 10 def new end |