What is the best way to add classes to table cells in rails based on differing criteria for each cell?
For example...I have a date cell: If the date is coming up on 10 days from that date, need to add a "upcoming-due" class. Or if the date is past today, add a "past-due" class.
On another cell, based on a string, it needs to have a class "on" or "off".
I'm not sure how to do this, but I do know I probably shouldn't have a bunch of logic in the views...
Please advise.