Class: Lcms::Engine::Admin::ResourceBulkEditsController
- Inherits:
-
AdminController
- Object
- ActionController::Base
- Lcms::Engine::ApplicationController
- AdminController
- Lcms::Engine::Admin::ResourceBulkEditsController
- Defined in:
- app/controllers/lcms/engine/admin/resource_bulk_edits_controller.rb
Constant Summary
Constants inherited from AdminController
AdminController::RE_GOOGLE_FOLDER
Instance Method Summary collapse
Methods inherited from AdminController
Methods included from PathHelper
#dynamic_document_path, #dynamic_material_path, #dynamic_path
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/lcms/engine/admin/resource_bulk_edits_controller.rb', line 17 def create BulkEditResourcesService.new(@resources, resource_params).edit! resources_count_msg = t(:resources_count, count: @resources.count) notice = t('.success', count: @resources.count, resources_count: resources_count_msg) redirect_to lcms_engine.admin_resources_path, notice: notice end |
#new ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/lcms/engine/admin/resource_bulk_edits_controller.rb', line 9 def new if @resources.any? @resource = BulkEditResourcesService.new(@resources).init_sample else redirect_to lcms_engine.admin_resources_path, alert: t('.no_resources') end end |