Rails 3: Best practices for saving models
问题 When should I save my models in rails? and who should be responsible for calling save, the model itself, or the caller? Lets say I have (public)methods like udpate_points , update_level , etc. in my user model. There are 2 options: The model/method is responsible for calling save . So each method will just call self.save . The caller is responsible for calling save. So each method only updates the attributes but the caller calls user.save when it's done with the user. The tradeoffs are fairly