Module: Ixtlan::OptimisticPersistence
- Defined in:
- lib/ixtlan/optimistic_persistence.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/ixtlan/optimistic_persistence.rb', line 9 def self.included(base) base.send(:include, ::Ixtlan::OptimisticPersistenceModule) base.before :valid? do raise StaleResourceError.new(model.name + "(#{key}) was stale") if stale? end end |