Module: DataMapper::Resource
- Defined in:
- lib/base/datamapper_l.rb
Overview
The following code will overwrite DataMapper’s functions, and replace them with a synchronized version of the same function.
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
76 77 78 79 80 |
# File 'lib/base/datamapper_l.rb', line 76 def destroy DataMapper.lock.synchronize do original_destroy end end |
#original_destroy ⇒ Object
68 |
# File 'lib/base/datamapper_l.rb', line 68 alias original_destroy destroy |
#original_save ⇒ Object
67 |
# File 'lib/base/datamapper_l.rb', line 67 alias original_save save |
#save ⇒ Object
70 71 72 73 74 |
# File 'lib/base/datamapper_l.rb', line 70 def save DataMapper.lock.synchronize do original_save end end |