I have two ActiveRecord models of the same class:
- #1: represents the current committed state of the row/model in the db
- #2: one that is potentially updated information for some of the fields of the first.
What I’m looking for is a way to update #1 on a field by field basis if #2 has a non-nil field. What’s the railsy way of doing this?
1 Answer