adds dossier edition to valuators

This commit is contained in:
Juanjo Bazán
2016-03-08 11:19:23 +01:00
committed by Juanjo Bazán
parent 7b4b3386f7
commit fcd6d0ce8b
8 changed files with 278 additions and 26 deletions

View File

@@ -9,4 +9,16 @@ class Valuation::SpendingProposalsController < Valuation::BaseController
def index
@spending_proposals = SpendingProposal.search(params, @current_filter).order(created_at: :desc).page(params[:page])
end
def valuate
@spending_proposal.update_attributes(valuation_params)
redirect_to valuation_spending_proposal_path(@spending_proposal), notice: t('valuation.spending_proposals.notice.valuate')
end
private
def valuation_params
params.require(:spending_proposal).permit(:price, :price_first_year, :price_explanation, :feasible, :feasible_explanation, :time_scope, :valuation_finished, :internal_comments)
end
end