can remove investment projects

This commit is contained in:
rgarcia
2016-09-09 15:43:32 +02:00
parent 9839d7afd0
commit 1c8f4d5ff0
8 changed files with 118 additions and 97 deletions

View File

@@ -32,12 +32,12 @@ module Budgets
end
def destroy
load_spending_proposal
load_spending_proposals
load_geozone
@investment = @line.investment
load_heading
@ballot_line.destroy
@ballot.reset_geozone
@line.destroy
load_investments
#@ballot.reset_geozone
end
private
@@ -72,9 +72,6 @@ module Budgets
@heading = @investment.heading
end
def load_geozone
@geozone = @line.investment.geozone
end
end
end
end

View File

@@ -99,7 +99,7 @@ module Budgets
end
def load_heading
@heading = @budget.headings.find(params[:heading_id]) if params[:geozone_id].present?
@heading = @budget.headings.find(params[:heading_id]) if params[:heading_id].present?
end
end