Sha256: dcc3eb11d655a6f0d9a09250135ff49ff26da27e60e446602639488625641f81

Contents?: true

Size: 988 Bytes

Versions: 30

Compression:

Stored size: 988 Bytes

Contents

module EffectiveAddresses
  class Engine < ::Rails::Engine
    engine_name 'effective_addresses'

    config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
    config.autoload_paths += Dir["#{config.root}/app/models/validators"]

    # Include Helpers to base application
    initializer 'effective_addresses.action_controller' do |app|
      ActiveSupport.on_load :action_controller do
        helper EffectiveAddressesHelper
      end
    end

    # Include acts_as_addressable concern and allow any ActiveRecord object to call it
    initializer 'effective_addresses.active_record' do |app|
      ActiveSupport.on_load :active_record do
        ActiveRecord::Base.extend(ActsAsAddressable::ActiveRecord)
      end
    end

    # Set up our default configuration options.
    initializer "effective_addresses.defaults", :before => :load_config_initializers do |app|
      eval File.read("#{config.root}/lib/generators/templates/effective_addresses.rb")
    end

  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
effective_addresses-1.2.1 lib/effective_addresses/engine.rb
effective_addresses-1.2.0 lib/effective_addresses/engine.rb
effective_addresses-1.1.0 lib/effective_addresses/engine.rb
effective_addresses-1.0.6 lib/effective_addresses/engine.rb
effective_addresses-1.0.5 lib/effective_addresses/engine.rb
effective_addresses-1.0.4 lib/effective_addresses/engine.rb
effective_addresses-1.0.3 lib/effective_addresses/engine.rb
effective_addresses-1.0.2 lib/effective_addresses/engine.rb
effective_addresses-1.0.1 lib/effective_addresses/engine.rb
effective_addresses-1.0.0 lib/effective_addresses/engine.rb