2 ms·
Use decorators. Draper is my personal favorite, and it very cleanly solves the issue of serialization nightmares and controller/model confusion. (I hope that i
by cheald 14y ago
Use decorators. Draper is my personal favorite, and it very cleanly solves the issue of serialization nightmares and controller/model confusion.
(I hope that it ends up in the Rails core someday, because it really is a gamechanger in how Rails is used for non-HTML content!)
- VeejayRampay 14y agoAgreed, Draper + Jbuilder and you got yourself plenty of decoupling and beauty.