Method: EffectiveAfterCommit::Base#before_commit
- Defined in:
- app/models/concerns/effective_after_commit.rb
#before_commit(connection: self.class.connection, &callback) ⇒ Object
18 19 20 21 |
# File 'app/models/concerns/effective_after_commit.rb', line 18 def before_commit(connection: self.class.connection, &callback) raise(NotImplementedError, "#{__method__} works only with Rails 5.0+") if ActiveRecord::VERSION::MAJOR < 5 Effective::AfterCommit.register_callback(connection: connection, name: __method__, callback: callback) end |