Sha256: 90d1ad3e02b6b6f20147ca3220bb11d3aaef2fa1b43ae5cbf4d009d12a5d33e9

Contents?: true

Size: 316 Bytes

Versions: 8

Compression:

Stored size: 316 Bytes

Contents

module Ardm
  module ActiveRecord
    module Finalize
      extend ActiveSupport::Concern

      included do
        class_attribute :on_finalize
        self.on_finalize = []
      end

      module ClassMethods
        def finalize
          on_finalize.each { |f| f.call }
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ardm-0.2.6 lib/ardm/active_record/finalize.rb
ardm-0.2.5 lib/ardm/active_record/finalize.rb
ardm-0.2.4 lib/ardm/active_record/finalize.rb
ardm-0.2.3 lib/ardm/active_record/finalize.rb
ardm-0.2.2 lib/ardm/active_record/finalize.rb
ardm-0.2.1 lib/ardm/active_record/finalize.rb
ardm-0.2.0 lib/ardm/active_record/finalize.rb
ardm-0.1.0 lib/ardm/active_record/finalize.rb