Talking head
Lone Star Ruby Conference 2010

This presentation, by Adam Keys, is licensed under a Creative Commons Attribution ShareAlike 3.0
80x15

Rails jumped on the scene five years ago in part due to excellent support for connecting database tables to Ruby classes via ActiveRecord. Rails 3 makes two major improvements to this support. ActiveModel makes it easy to turn any old object into one that looks like ActiveRecord to your Rails app. ActiveRelation makes many kinds of queries easier and makes it possible to write some queries that were very difficult in the past. In this talk, we'll learn how to build our own model layer using ActiveRelation and ActiveModel. We'll start by learning how ARel works and how to use it. Then we'll write an adapter for our own database. Next, we'll see what ActiveModel provides and how we use it through ActiveRecord. With this in mind, we'll add functionality to our models that make them look just like ActiveRecord to our Rails app. In the end, we'll have a good grasp on the new options for modeling data in Rails 3 and how we can use that to write cleaner apps.

Rated:
Viewed 2,157 times
Tags: There are no tags for this video.