Sha256: cfe835ec22d3b1142e1aac8e27423cb68de07c71ff983975c8db03d5bc220a4d

Contents?: true

Size: 667 Bytes

Versions: 50

Compression:

Stored size: 667 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Accountability
    module Admin
      # Controller that allows managing all the attachments for an
      # accountability result.
      #
      class AttachmentsController < Admin::ApplicationController
        include Decidim::Admin::Concerns::HasAttachments

        def after_destroy_path
          results_path
        end

        def attached_to
          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.26.8 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.27.4 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.27.3 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.7 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.5 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.27.2 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.27.1 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.4 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.27.0 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.3 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.27.0.rc2 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.27.0.rc1 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.2 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.1 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.0 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.0.rc2 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.26.0.rc1 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.25.2 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.25.1 app/controllers/decidim/accountability/admin/attachments_controller.rb
decidim-accountability-0.25.0 app/controllers/decidim/accountability/admin/attachments_controller.rb