Split out WorksController#update_preview_mode helper function.