When I first started using Rails, the virtual attributes episodes helped me heaps.
But as time goes, I start seeing my model class getting fatter and fatter, and becoming un-manageable (especially with all those AR callbacks). I guess it's a progressive advancement to start using PORO to move the logic out.
+1 here.
When I first started using Rails, the virtual attributes episodes helped me heaps.
But as time goes, I start seeing my model class getting fatter and fatter, and becoming un-manageable (especially with all those AR callbacks). I guess it's a progressive advancement to start using PORO to move the logic out.
check out a gem called "representative_view" https://github.com/mdub/representative_view