Data Modeling with Active Record in Rails by Hannah Howard
A presentation given on July 18th 2013 at Oversee.net at the LA Ruby & Rails Study Group Eastside/Westside Monthly Meetup.
In this workshop we will learn the basics of how data is modeled in a relational database, and how to interact with the database through Activerecord. We'll work on a simple app to keep track of a music catalog and use this example to introduce concepts like relationships, queries, and migrations. By the end, you'll have a working understanding of how to build data models to power your own apps.
The Rails view system is familiar to people who come from an HTML background. As a result, many beginning Rails programmers tend to stay focused on this component. But the core of any sizable Rails app is ActiveRecord and the model layer-- the “M” in MVC. Unfortunately, ActiveRecord is built on relational databases and SQL, concepts which are foreign to most beginning Rails programmers. After this workshop you will no longer be unfamiliar.