4 ms·
"If the amount owed is more than $100, make it red in the table" Well, my usual advice on this goes back to the first time I encountered someone pushing a simi
by ubernostrum 17y ago
"If the amount owed is more than $100, make it red in the table"
Well, my usual advice on this goes back to the first time I encountered someone pushing a similar situation. In that case he was showing government safety ratings for cars, and if the rating was above a certain level wanted to show a special graphic because that got it some special certification.
Rather than try to force that logic into a template, I suggested giving the relevant model a "meets_certification_standard()" method, since that's the sort of thing you'd probably want to reuse for more than just presentation. And in your case I'd bet a similar approach would be the best solution.
- wvenable 17y agoMakes sense but a lot of decisions are much less "important" than that as some are purely about the rendering and don't have many meaning beyond it.