Episode 110: Converting Flat Data into Rich Ruby Objects with :composed_of

Published: June 25, 2012, 6:08 p.m.

Storing simple data as model attributes in a database is easy to do in Rails, but sometimes we want to handle and manipulate data that is more than just a string or a number.The :composed_of macro in ActiveRecord gives us that ability, and it's simpler than you think. Chris McCann shows us how.