Allow actions to be unexecuted

Before actions could be marked as executed. With this commit we are also allowing actions to be marked as unexecuted.
This commit is contained in:
voodoorai2000
2019-04-23 14:56:23 +02:00
committed by decabeza
parent e139057001
commit dfbdc0568c
4 changed files with 26 additions and 1 deletions

View File

@@ -35,6 +35,14 @@ class Dashboard::ActionsController < Dashboard::BaseController
redirect_to request.referer
end
def unexecute
authorize! :dashboard, proposal
Dashboard::ExecutedAction.where(proposal: proposal, action: dashboard_action).first.destroy
redirect_to request.referer
end
private
def dashboard_action