Class: Hyrax::CollectionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Hyrax::CollectionsController
- Defined in:
- app/controllers/hyrax/collections_controller.rb
Instance Method Summary collapse
-
#files ⇒ Object
Renders a JSON response with a list of files in this collection This is used by the edit form to populate the thumbnail_id dropdown.
Methods included from BreadcrumbsForCollections
#add_breadcrumb_for_action, #add_breadcrumb_for_controller
Methods included from Breadcrumbs
#add_breadcrumb_for_action, #add_breadcrumb_for_controller, #build_breadcrumbs, #default_trail, #trail_from_referer
Methods included from CollectionsControllerBehavior
Instance Method Details
#files ⇒ Object
Renders a JSON response with a list of files in this collection This is used by the edit form to populate the thumbnail_id dropdown
12 13 14 15 16 17 |
# File 'app/controllers/hyrax/collections_controller.rb', line 12 def files result = form.select_files.map do |label, id| { id: id, text: label } end render json: result end |