Rails 3.2 RC1 released, now with Active Record Store

The Rails team has released a release candidate for Rails 3.2, the last major version supporting Ruby 1.8.7:

Among the list of changes, the Active Record Store caught my eye:

class User < ActiveRecord::Base
  store :settings, accessors: [ :color, :homepage ]
u = User.new(color: 'black', homepage: '37signals.com')
u.color                          # Accessor stored attribute
u.settings[:country] = 'Denmark' # Any attribute, even if not specified with an accessor

I’ve long used Rails Settings in many projects. It’ll be nice to have this baked in.

News Films

Our little film studio focuses on telling developer-centric stories that need to be seen.

GopherCon 2016 Conference Recap

0:00 / 0:00