ardm 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,14 +3,15 @@ module Ardm
3
3
  module Finalize
4
4
  extend ActiveSupport::Concern
5
5
 
6
- included do
7
- class_attribute :on_finalize
8
- self.on_finalize = []
6
+ def self.on_finalize(&block)
7
+ @on_finalize ||= []
8
+ @on_finalize << block if block_given?
9
+ @on_finalize
9
10
  end
10
11
 
11
12
  module ClassMethods
12
13
  def finalize
13
- on_finalize.each { |f| f.call }
14
+ Ardm::ActiveRecord::Finalize.on_finalize.each { |f| f.call }
14
15
  end
15
16
  end
16
17
  end
data/lib/ardm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ardm
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ardm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: