adds proposal edit

This commit is contained in:
rgarcia
2015-09-12 12:35:54 +02:00
parent 922d3f1b24
commit 845ca22152
2 changed files with 31 additions and 0 deletions

View File

@@ -32,6 +32,20 @@ class ProposalsController < ApplicationController
end
end
def edit
load_featured_tags
end
def update
@proposal.assign_attributes(proposal_params)
if @proposal.save_with_captcha
redirect_to @proposal, notice: t('flash.actions.update.notice', resource_name: 'Proposal')
else
load_featured_tags
render :edit
end
end
private
def proposal_params