move mongoid-specific update code out of DataController