This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Allows filtering out attributes that increment the ActiveRecord optimistic lock version, e.g. updated_at, or | |
| # other attributes that will not cause a conflict issue. | |
| module SelectivelyOptimisticallyLockable | |
| extend ActiveSupport::Concern | |
| private | |
| def locking_enabled? | |
| self.changed.any? {|att| !self.class.skips_optimistic_locking?(att) } |