Polls in the dashboard
A reduced version of polls has been added to the dashboard
This commit is contained in:
22
app/controllers/dashboard/base_controller.rb
Normal file
22
app/controllers/dashboard/base_controller.rb
Normal 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
|
||||
Reference in New Issue
Block a user