Sha256: d229134ca354cb0227f6843f96ca77e0dfdc4209e58e192a85e3f0be3daa6430

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

$LOAD_PATH << File.dirname(__FILE__)

require 'active_record'
require 'acts_as_tokenizable/acts_as_tokenizable'
require 'acts_as_tokenizable/string_utils'

module ActsAsTokenizable
  if defined?(Rails::Railtie)
    class Railtie < Rails::Railtie
      initializer 'acts_as_tokenizable.insert_into_active_record' do
        ActiveSupport.on_load :active_record do
          ActiveRecord::Base.send(:include, ActsAsTokenizable)
        end
      end
    end
  elsif defined?(ActiveRecord)
    ActiveRecord::Base.send(:include, ActsAsTokenizable)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_tokenizable-0.9.0 lib/acts_as_tokenizable.rb