Sha256: 858bd84d12c32acaca62a8ff67ae2eb55f9ef2e1c99eb4d272f0e69485cac9a5

Contents?: true

Size: 608 Bytes

Versions: 22

Compression:

Stored size: 608 Bytes

Contents

require 'geocoder/models/active_record'

module Geocoder
  if defined? Rails::Railtie
    require 'rails'
    class Railtie < Rails::Railtie
      initializer 'geocoder.insert_into_active_record', before: :load_config_initializers do
        ActiveSupport.on_load :active_record do
          Geocoder::Railtie.insert
        end
      end
      rake_tasks do
        load "tasks/geocoder.rake"
        load "tasks/maxmind.rake"
      end
    end
  end

  class Railtie
    def self.insert
      if defined?(::ActiveRecord)
        ::ActiveRecord::Base.extend(Model::ActiveRecord)
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
geocoder-1.8.3 lib/geocoder/railtie.rb
geocoder-1.8.2 lib/geocoder/railtie.rb
geocoder-1.8.1 lib/geocoder/railtie.rb
geocoder-1.8.0 lib/geocoder/railtie.rb
geocoder-1.7.5 lib/geocoder/railtie.rb
geocoder-1.7.4 lib/geocoder/railtie.rb
geocoder-1.7.3 lib/geocoder/railtie.rb
geocoder-1.7.2 lib/geocoder/railtie.rb
geocoder-1.7.1 lib/geocoder/railtie.rb
geocoder-1.7.0 lib/geocoder/railtie.rb
geocoder-1.6.7 lib/geocoder/railtie.rb
geocoder-1.6.6 lib/geocoder/railtie.rb
geocoder-1.6.5 lib/geocoder/railtie.rb
geocoder-1.6.4 lib/geocoder/railtie.rb
geocoder-1.6.3 lib/geocoder/railtie.rb
geocoder-1.6.2 lib/geocoder/railtie.rb
geocoder-1.6.1 lib/geocoder/railtie.rb
geocoder-1.6.0 lib/geocoder/railtie.rb
geocoder-1.5.2 lib/geocoder/railtie.rb
really-broken-geocoder-2.0.0 lib/geocoder/railtie.rb