Module: ThinkFeelDoDashboard::ApplicationHelper

Defined in:
app/helpers/think_feel_do_dashboard/application_helper.rb

Overview

Ensure font awesome icon helpers are available.

Constant Summary collapse

TOP_LEVEL_CONTROLLERS =
%w( arms groups participants users reports ).freeze

Instance Method Summary collapse

Instance Method Details

Render navigational information in the form of breadcrumbs



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/helpers/think_feel_do_dashboard/application_helper.rb', line 7

def breadcrumbs
  return unless show_breadcrumbs?

  content_for(
    :breadcrumbs,
    (:ol, class: "breadcrumb") do
      concat((:li, link_to("Home", root_path)))

      if can_view_resource_index?
        concat((:li,
                           link_to(controller_name.capitalize,
                                   url_for(controller: controller_name))
                          )
              )
      end
    end
  )
end

#social_features?Boolean

Returns:

  • (Boolean)


26
27
28
29
30
# File 'app/helpers/think_feel_do_dashboard/application_helper.rb', line 26

def social_features?
  if Rails.application.config.respond_to?(:include_social_features)
    Rails.application.config.include_social_features
  end
end