Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another choice of implemention is like this: ``` @model.class.find_by(:"#{primary_key}" => @model.send(:"#{primary_key}")).update(attrs) ``` but for some reasons I don't adopt it. First it makes 2 queries instead of one. Secondly it has potential risk to race conditions.
- Loading branch information