Module: Activerecord::Transactionable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/activerecord/transactionable.rb,
lib/activerecord/transactionable/version.rb
Overview
SRP: Provides an example of correct behavior for wrapping transactions. NOTE: Rails’ transactions are per-database connection, not per-model, nor per-instance,
see: http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- DEFAULT_ERRORS_TO_HANDLE =
[ActiveRecord::RecordInvalid]
- DEFAULT_ERRORS_WHICH_PREPARE_ERRORS_ON_SELF =
[ActiveRecord::RecordInvalid]
- VERSION =
"0.1.1"
Instance Method Summary collapse
Instance Method Details
#transaction_wrapper(**args) ⇒ Object
15 16 17 18 19 |
# File 'lib/activerecord/transactionable.rb', line 15 def transaction_wrapper(**args) self.class.transaction_wrapper(object: self, **args) do yield end end |