Modelsbest practices (27) object oriented design (7) testing (7) models (4) performance (4) views (4) gems (3) case studies (2) cloudflare (1) controllers (1) metaprogramming (1) migrations (1) All PostsMaking Iterative Tests Maintainable with MetaprogrammingScalable and DRY approach to iterative model testing in Rails. Don't loop through arrays to create test cases.Best Practices Testing Models MetaprogrammingRoland Lopez Roland Lopez04/05/2024 · 2 min readBest Practices: Refactoring spaghetti sql in rails.Typical mishandling of Active Record when a Senior Dev learns Rails: not utilizing association, forcing SQL management in the controller.Best Practices ModelsRoland Lopez Roland Lopez02/05/2024 · 2 min readRefactoring fat models in Rails: delegate extract and composeReduce complexity in Rails models with the method delegation, extraction, and composition.Best Practices ModelsRoland Lopez Roland Lopez02/05/2024 · 2 min readOOD Principles and Rails: The Law of DemeterIn Rails, it's tempting to chain method calls due to ActiveRecord associations. But it just creates a maintenance trap.Best Practices ModelsRoland Lopez Roland Lopez01/05/2024 · 1 min read