Class: ImageSearchController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ImageSearchController
- Defined in:
- app/controllers/image_search_controller.rb
Instance Method Summary collapse
Instance Method Details
#search_repository ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/image_search_controller.rb', line 2 def search_repository catch_network_errors do = params[:tags] || 'false' result = image_search_service.search(term: params[:search], tags: ) respond_to do |format| format.js { render json: prepare_for_autocomplete(result) } format.html do render partial: 'repository_search_results', locals: { repositories: result } end end end end |