Adapted mix-rails-writer to use ActiveRecord