Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log destroy result when duplicate record is found
When a duplicate record is found, a message is logged that the record has been detected *and destroyed* before attempting to destroy the record. If the destroy returns False, and the record is not destroyed, nothing is logged. This happens in the case of a read-only record. An alternate solution could be to call destroy! so that an 'ActiveRecord::RecordNotDestroyed' exception is raised if the record is not destroyed, and read-only records could be handled in a rescue block.
- Loading branch information