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, #mark_active_action
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
16 17 18 19 20 21 |
# File 'app/controllers/hyrax/collections_controller.rb', line 16 def files result = form.select_files.map do |label, id| { id: id, text: label } end render json: result end |