Module: ThinkFeelDoEngine::Coach::ActivityColorCodeHelper
- Defined in:
- app/helpers/think_feel_do_engine/coach/activity_color_code_helper.rb
Overview
Provides helpers for color coding activities
Instance Method Summary collapse
-
#get_color_class(activity) ⇒ Object
Returns a bootstrap table row class with an appropriate color success - green info - blue warning - yellow danger - red.
Instance Method Details
#get_color_class(activity) ⇒ Object
Returns a bootstrap table row class with an appropriate color success - green info - blue warning - yellow danger - red
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/helpers/think_feel_do_engine/coach/activity_color_code_helper.rb', line 12 def get_color_class(activity) if activity.reviewed_and_complete? && activity.rated? ( activity.actual_pleasure_intensity, activity.actual_accomplishment_intensity ) elsif activity.rated? ( activity.actual_pleasure_intensity, activity.actual_accomplishment_intensity ) else not_rated_color(activity) end end |