Updated ActiveRecord model