Edit button moved to dashboard.
Added button that publishes the proposal.
This commit is contained in:
Juan Salvador Pérez García
2018-06-08 15:25:04 +02:00
parent 212c088d35
commit 304ae23c81
7 changed files with 35 additions and 15 deletions

View File

@@ -12,6 +12,13 @@ class ProposalsDashboardController < ApplicationController
authorize! :dashboard, proposal
end
def publish
authorize! :publish, proposal
proposal.publish
redirect_to proposal_dashboard_index_path(proposal), notice: t('proposals.notice.published')
end
private
def proposal