Tasks persisting to database with flash message