Add setting to allow remove investments supports

This commit is contained in:
decabeza
2021-11-06 00:38:02 +01:00
committed by Javi Martín
parent 1a73b20d9b
commit 9979b53994
12 changed files with 74 additions and 13 deletions

View File

@@ -1,6 +1,9 @@
module Budgets
module Investments
class VotesController < ApplicationController
include FeatureFlags
feature_flag :remove_investments_supports, only: :destroy
load_and_authorize_resource :budget
load_and_authorize_resource :investment, through: :budget, class: "Budget::Investment"
load_and_authorize_resource through: :investment, through_association: :votes_for, only: :destroy