Module: TPRecordOptimistic
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/tp_record_optimistic.rb,
lib/tp_record_optimistic/version.rb
Defined Under Namespace
Classes: Engine
Constant Summary collapse
- VERSION =
'0.0.4'
Instance Method Summary collapse
Instance Method Details
#optimistic_unique(args = {}) ⇒ Object
22 |
# File 'lib/tp_record_optimistic.rb', line 22 def optimistic_unique(args = {}); end |
#save_optimistic(*args) ⇒ Object Also known as: save
13 14 15 16 17 18 |
# File 'lib/tp_record_optimistic.rb', line 13 def save_optimistic(*args) old_save(*args) rescue ActiveRecord::RecordNotUnique => e errors.add('all', e.to_s) return false end |