added the .update_attributes to the controller metod for update.