O'Reilly logo

Rails Crash Course by Anthony Lewis

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 8. Advanced Active Record

When building a new application, work out the data model first. A data model is a description of the models in your program, along with their attributes and associations. First, identify the models needed and the relationships between them, and then create tables for these models and test them in the Rails console. Once the data models are working properly, building the rest of the application is much easier.

Some people think of diagrams with boxes and arrows when they hear the words data model. These diagrams are unnecessary if you understand how the models relate without them. This chapter does include some basic diagrams, however, to illustrate different associations. In each diagram, the arrows point from ...

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