4 ms·
The theme between these efforts seems to me: Instead of a separate language in a separate world, our views are normal objects/data (in all their glory and power
by autodidakto 14y ago
The theme between these efforts seems to me: Instead of a separate language in a separate world, our views are normal objects/data (in all their glory and power) that happen to know how to print themselves as html.
- slurgfest 14y agoI'm certainly no cultist of MVC, but I would tend to agree with them that tightly coupling presentation details to the basic model is usually unwise.
- judofyr 14y agoYou're not supposed to put these into your models. You should create a different class/method that accepts models and returns HTML: class TweetWidget def initialize(tweet) @tweet = tweet end def content; … end end