The link 'Checkout the complete course' in progress view shows not only
the next goal but all the upcoming goals.
This commit is contained in:
Juan Salvador Pérez García
2018-07-11 08:07:59 +02:00
parent dc4945f1aa
commit a606324ee7
6 changed files with 61 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
class ProposalsDashboardController < Dashboard::BaseController
helper_method :proposal_dashboard_action, :active_resources
helper_method :proposal_dashboard_action, :active_resources, :course
def index
authorize! :dashboard, proposal
@@ -69,6 +69,10 @@ class ProposalsDashboardController < Dashboard::BaseController
end
def active_resources
ProposalDashboardAction.active.resources.order(required_supports: :asc, day_offset: :asc)
@active_resources ||= ProposalDashboardAction.active.resources.order(required_supports: :asc, day_offset: :asc)
end
def course
@course ||= ProposalDashboardAction.course_for(proposal)
end
end