Class: Decidim::Budgets::Admin::AttachmentsController

Inherits:
ApplicationController show all
Includes:
Admin::Concerns::HasAttachments
Defined in:
decidim-budgets/app/controllers/decidim/budgets/admin/attachments_controller.rb

Overview

Controller that allows managing all the attachments for a participatory process.

Instance Method Summary collapse

Methods inherited from ApplicationController

#projects

Methods inherited from Admin::Features::BaseController

#current_feature, #current_participatory_process, #parent_path

Methods inherited from Admin::ApplicationController

#current_ability_klass, #user_not_authorized_path

Instance Method Details

#after_destroy_pathObject



11
12
13
# File 'decidim-budgets/app/controllers/decidim/budgets/admin/attachments_controller.rb', line 11

def after_destroy_path
  projects_path
end

#attached_toObject



15
16
17
# File 'decidim-budgets/app/controllers/decidim/budgets/admin/attachments_controller.rb', line 15

def attached_to
  project
end

#authorization_objectObject



23
24
25
# File 'decidim-budgets/app/controllers/decidim/budgets/admin/attachments_controller.rb', line 23

def authorization_object
  project.feature
end

#projectObject



19
20
21
# File 'decidim-budgets/app/controllers/decidim/budgets/admin/attachments_controller.rb', line 19

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