Sha256: 8547af20fa610712de88c933dc5a715b0230fb42fe20fdc3c5f606bb4e97816d

Contents?: true

Size: 623 Bytes

Versions: 10

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

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

        def after_destroy_path
          projects_path
        end

        def attached_to
          project
        end

        def project
          @project ||= projects.find(params[:project_id])
        end

        def authorization_object
          project.component
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-budgets-0.13.1 app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.12.2 app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.13.0 app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.12.1 app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.13.0.pre1 app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.12.0 app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.11.2 app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.12.0.pre app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.11.1 app/controllers/decidim/budgets/admin/attachments_controller.rb
decidim-budgets-0.11.0.pre1 app/controllers/decidim/budgets/admin/attachments_controller.rb