Class: Spotlight::FeaturedImagesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::FeaturedImagesController
- Defined in:
- app/controllers/spotlight/featured_images_controller.rb
Overview
Handles requests to upload images for exhibit thumbnails
Instance Method Summary collapse
Methods included from Concerns::ApplicationController
#enabled_in_spotlight_view_type_configuration?, #field_enabled?
Methods included from Controller
#add_breadcrumb, #blacklight_config, #breadcrumbs, #current_exhibit, #current_masthead, #current_masthead=, #current_site, #default_url_options, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_path, #resource_masthead?, #search_action_url, #search_facet_path, #search_state, #set_exhibit_locale_scope, #set_locale
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/spotlight/featured_images_controller.rb', line 8 def create if @featured_image.save && @featured_image.file_present? render json: { tilesource:, id: @featured_image.id } else render json: { error: 'unable to create image' }, status: :bad_request end end |