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 ]
end
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.


Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.