ActiveRecord 3 compatibility