change ORM from Mongoid to ActiveRecord