You are previewing Rails™ AntiPatterns: Best Practice Ruby on Rails™ Refactoring.

Rails™ AntiPatterns: Best Practice Ruby on Rails™ Refactoring

Cover of Rails™ AntiPatterns: Best Practice Ruby on Rails™ Refactoring by Tammer Saleh... Published by Addison-Wesley Professional
O'Reilly logo

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 ...

The best content for your career. Discover unlimited learning on demand for around $1/day.