Sha256: d407e5d489f1f040a6555c0916cb99debe2352d0e757142cc549b62ac02112a3

Contents?: true

Size: 670 Bytes

Versions: 4

Compression:

Stored size: 670 Bytes

Contents

# frozen_string_literal: true

require_dependency "decidim/admin/application_controller"

module Decidim
  module Admin
    # Controller that allows managing all the attachments for a participatory
    # process.
    #
    class ParticipatoryProcessAttachmentsController < ApplicationController
      include Concerns::ParticipatoryProcessAdmin
      include Concerns::HasAttachments

      def after_destroy_path
        participatory_process_attachments_path(current_participatory_process.id)
      end

      def attached_to
        current_participatory_process
      end

      def authorization_object
        @attachment || Attachment
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
decidim-admin-0.4.2 app/controllers/decidim/admin/participatory_process_attachments_controller.rb
decidim-admin-0.4.1 app/controllers/decidim/admin/participatory_process_attachments_controller.rb
decidim-0.4.2 decidim-admin/app/controllers/decidim/admin/participatory_process_attachments_controller.rb
decidim-0.4.1 decidim-admin/app/controllers/decidim/admin/participatory_process_attachments_controller.rb