Class: Arclight::RepositoriesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Arclight::RepositoriesController
- Defined in:
- app/controllers/arclight/repositories_controller.rb
Overview
Controller for our /repositories index page
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 |
# File 'app/controllers/arclight/repositories_controller.rb', line 6 def index @repositories = Arclight::Repository.all load_collection_counts end |
#show ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/arclight/repositories_controller.rb', line 11 def show @repository = Arclight::Repository.find_by!(slug: params[:id]) search_service = Blacklight.repository_class.new(blacklight_config) @response = search_service.search( q: "level_ssim:Collection repository_ssim:\"#{@repository.name}\"", rows: 100 ) @collections = @response.documents end |