Polls in the dashboard

A reduced version of polls has been added to the dashboard
This commit is contained in:
Juan Salvador Pérez García
2018-06-26 08:05:38 +02:00
parent bafdd697b8
commit 2ce9f95283
24 changed files with 463 additions and 37 deletions

View File

@@ -0,0 +1,22 @@
class Dashboard::BaseController < ApplicationController
before_action :authenticate_user!
helper_method :proposal, :proposed_actions, :resources
respond_to :html
layout 'proposals_dashboard'
private
def proposal
@proposal ||= Proposal.find(params[:proposal_id])
end
def proposed_actions
@proposed_actions ||= ProposalDashboardAction.proposed_actions.active_for(proposal)
end
def resources
@resources ||= ProposalDashboardAction.resources.active_for(proposal)
end
end