For example, why are the date helpers written like this:
time_ago_in_words(@from_time)
Instead of like this:
@from_time.time_ago_in_words
Is this a clear design error / inconsistency? Or is there some reason for this?
Helpers are methods on the view object, rather than on the object they're displaying. This makes sense in an OO sense because the view is displaying the data in a particular format, so it's in charge of converting the models to that format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With