update ruby on rail CRUD function