Class: Decidim::Accountability::Admin::AttachmentsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Decidim::Admin::Concerns::HasAttachments
Defined in:
app/controllers/decidim/accountability/admin/attachments_controller.rb

Overview

Controller that allows managing all the attachments for an accountability result.

Instance Method Summary collapse

Instance Method Details

#after_destroy_pathObject



12
13
14
# File 'app/controllers/decidim/accountability/admin/attachments_controller.rb', line 12

def after_destroy_path
  results_path
end

#attached_toObject



16
17
18
# File 'app/controllers/decidim/accountability/admin/attachments_controller.rb', line 16

def attached_to
  result
end

#resultObject



20
21
22
# File 'app/controllers/decidim/accountability/admin/attachments_controller.rb', line 20

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