Class: Decidim::ActionDelegator::Admin::ManageDelegationsController
- Inherits:
-
ApplicationController
- Object
- Decidim::Admin::ApplicationController
- ApplicationController
- Decidim::ActionDelegator::Admin::ManageDelegationsController
- Includes:
- Paginable, NeedsPermission
- Defined in:
- app/controllers/decidim/action_delegator/admin/manage_delegations_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/decidim/action_delegator/admin/manage_delegations_controller.rb', line 21 def create :create, :delegation @csv_file = params[:csv_file] redirect_to(new_setting_manage_delegation_path) && return if @csv_file.blank? csv_file = @csv_file.read.force_encoding("utf-8").encode("utf-8") @import_summary = Decidim::ActionDelegator::Admin::ImportCsvJob.perform_now("DelegationsCsvImporter", csv_file, current_user, current_setting) flash[:notice] = t(".success") redirect_to setting_delegations_path(current_setting) end |
#new ⇒ Object
15 16 17 18 19 |
# File 'app/controllers/decidim/action_delegator/admin/manage_delegations_controller.rb', line 15 def new :create, :delegation @errors = [] end |