Sha256: 3ae29de63a4a204762477f157bb12819fe92607d8f1985692a910c1f5e2bcb07

Contents?: true

Size: 778 Bytes

Versions: 50

Compression:

Stored size: 778 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Accountability
    module Admin
      # Controller that allows managing all the attachment collections for an
      # accountability result.
      #
      class AttachmentCollectionsController < Admin::ApplicationController
        include Decidim::Admin::Concerns::HasAttachmentCollections

        def after_destroy_path
          result_attachment_collections_path(result, result.component, current_participatory_space)
        end

        def collection_for
          result
        end

        def result
          @result ||= results.find(params[:result_id])
        end

        private

        def results
          @results ||= Result.where(component: current_component)
        end
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
decidim-accountability-0.29.1 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.28.4 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.27.9 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.29.0 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.28.3 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.27.8 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.29.0.rc4 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.29.0.rc3 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.29.0.rc2 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.29.0.rc1 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.28.2 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.27.7 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.28.1 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.27.6 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.26.10 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.26.9 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.28.0 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.27.5 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.28.0.rc5 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
decidim-accountability-0.28.0.rc4 app/controllers/decidim/accountability/admin/attachment_collections_controller.rb