Class: Spotlight::AttachmentsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::AttachmentsController
- Defined in:
- app/controllers/spotlight/attachments_controller.rb
Overview
Create image attachments for the sir-trevor image widget
Instance Method Summary collapse
-
#create ⇒ Object
POST /attachments.
Methods included from Controller
#blacklight_config, #current_exhibit, #current_masthead, #current_masthead=, #default_masthead?, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #search_action_url, #search_facet_url
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#create ⇒ Object
POST /attachments
10 11 12 13 14 15 16 17 |
# File 'app/controllers/spotlight/attachments_controller.rb', line 10 def create @attachment.attributes = if @attachment.save render json: @attachment else render action: 'new' end end |