Class: ResearchersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ResearchersController
- Defined in:
- app/controllers/researchers_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#ajax_list ⇒ Object
5 6 7 8 9 |
# File 'app/controllers/researchers_controller.rb', line 5 def ajax_list search_term = params["query"] || "" researchers = { suggestions: Researcher.autocomplete_list(search_term) } render json: researchers.to_json end |
#index ⇒ Object
11 12 13 |
# File 'app/controllers/researchers_controller.rb', line 11 def index @researchers = Researcher.all end |