O'Reilly logo

Rails™ AntiPatterns: Best Practice Ruby on Rails™ Refactoring by Chad Pytel, Tammer Saleh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Models

The Model layer of your Rails application often provides the core structure of your application. Especially if you’re following a RESTful application design pattern, the structure that is initially laid out in your models will carry through to your controllers and views.

The Model layer should also contain the business logic of your application. Therefore, the models of your application will often receive the majority of developer attention throughout a project’s lifecycle.

Because so much attention is paid to the models, and because so much responsibility is contained within them, it’s relatively easy for things to get out of hand in the models as an application grows and evolves. Also, because of the powerful nature of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required