Files
nairobi/app/controllers/dashboard/base_controller.rb
Juan Salvador Pérez García 2ce9f95283 Polls in the dashboard
A reduced version of polls has been added to the dashboard
2018-07-17 17:57:30 +02:00

23 lines
507 B
Ruby

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