I have a report in which I list the common values and then the changes in parentheses. For instance:.
Songs: 45 (+10 from last week)
So, I want to print the integer 10 as "+10" and -10 as "-10"
I'm doing now
(song_change >= 0 ? '+' : '') + song_change.to_s
Is there a better way?
source
share