Class: Spotlight::Resources::UploadController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::Resources::UploadController
- Defined in:
- app/controllers/spotlight/resources/upload_controller.rb
Instance Method Summary collapse
Methods included from Controller
#blacklight_config, #current_exhibit, #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
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/spotlight/resources/upload_controller.rb', line 12 def create @resource.attributes = resource_params if @resource.save flash[:notice] = t('spotlight.resources.upload.success') if params["add-and-continue"] redirect_to new_exhibit_resources_upload_path(@resource.exhibit) else redirect_to admin_exhibit_catalog_index_path(@resource.exhibit) end else flash[:error] = t('spotlight.resources.upload.error') redirect_to admin_exhibit_catalog_index_path(@resorce.exhibit) end end |