I need to show a different background color depending on the type of
comment posted. The type of comment is determined from a drop-down
selection. I figured the simplest way would be to do something like I
have below, but I can't seem to get it to work:
<tr <%= puts '"style = "background: red;"' if comment.comment_type ==
'Hiring Process' %> >
I have 4-5 comment_types that need coloring, so I'll probably move
this into a helper when I'm finished using some form of,
if comment_type == 'Hiring Process'
puts "style = 'background: red;'"
elsif comment_type == 'Job Title Change'
puts "style = 'background: green;'"
A similar application would be a help desk ticket system where high
priority tickets would be shown in a different color.