Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checking that the record instance responds to the counter setter meth…
…od before calling update_counters
- Loading branch information
c6c17ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, this should be even better :)
next unless other.respond_to?(counter) && respond_to?("#{counter}=")