More Rails 3 modifications, mostly ActiveRecord stuff.
Fix lingering Rails 3 issues.