mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Check the version of after-commit-everywhere gem
This commit is contained in:
parent
86920c68d9
commit
32dc48a55e
1 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,8 @@ module AASM
|
|||
def self.included(base)
|
||||
begin
|
||||
require 'after_commit_everywhere'
|
||||
raise LoadError unless Gem::Version.new(::AfterCommitEverywhere::VERSION) >= Gem::Version.new('0.1.5')
|
||||
|
||||
base.send(:include, ::AfterCommitEverywhere) unless base.include?(::AfterCommitEverywhere)
|
||||
base.send(:alias_method, :aasm_execute_after_commit, :after_commit)
|
||||
rescue LoadError
|
||||
|
|
Loading…
Add table
Reference in a new issue