Changed database from mongo to mysql with active record