Module: ThinkFeelDoEngine::EmotionsHelper

Defined in:
app/helpers/think_feel_do_engine/emotions_helper.rb

Overview

Used to change color of table row based on emotion

Instance Method Summary collapse

Instance Method Details

#emotion_class(emotional_rating) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'app/helpers/think_feel_do_engine/emotions_helper.rb', line 5

def emotion_class(emotional_rating)
  case emotional_rating.rating
  when 0..4
    "danger"
  when 6..10
    "success"
  else
    ""
  end
end