Sha256: 031db4ee3db1f9b20026f89a9bdf534d964f818ee7ceb34b955517a682c1d286

Contents?: true

Size: 302 Bytes

Versions: 1

Compression:

Stored size: 302 Bytes

Contents

module AutoIncrement
  module ActiveRecord
    extend ActiveSupport::Concern

    module ClassMethods
      def auto_increment(options = {})
        before_create Incrementor.new(options)
      end
    end
  end
end

# Extend ActiveRecord's functionality
ActiveRecord::Base.send :extend, AutoIncrement

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auto_increment-1.1.0 lib/auto_increment/active_record.rb