Module: DashboardHelper

Defined in:
app/helpers/dashboard_helper.rb

Instance Method Summary collapse

Instance Method Details

#completed_essentials(items) ⇒ Object



12
13
14
15
# File 'app/helpers/dashboard_helper.rb', line 12

def completed_essentials(items)
  collection = ThemePresentation.wrap_collection(items, WoopleTheme::Dashboard::CompletedEssentialPresenter)
  render partial: 'dashboard/completed_essential', collection: collection
end

#essentials_section(presenter) ⇒ Object



7
8
9
10
# File 'app/helpers/dashboard_helper.rb', line 7

def essentials_section(presenter)
  render partial: 'dashboard/essentials_section',
         object: ThemePresentation.wrap(presenter, WoopleTheme::Dashboard::EssentialsSectionPresenter)
end

#status_alert(color, description) ⇒ Object



2
3
4
5
# File 'app/helpers/dashboard_helper.rb', line 2

def status_alert(color, description)
  render partial: 'dashboard/status_alert',
         object: ThemePresentation.wrap({ color: color, description: description }, WoopleTheme::Dashboard::StatusAlertPresenter)
end

#total_courses(total) ⇒ Object



17
18
19
# File 'app/helpers/dashboard_helper.rb', line 17

def total_courses(total)
  render partial: 'dashboard/total_courses', locals: {total: total}
end