Sha256: b98967c9e0b6fef00a61f5817c76cfc8276789d396260f659e4f9eb65ca9954d

Contents?: true

Size: 899 Bytes

Versions: 15

Compression:

Stored size: 899 Bytes

Contents

module EffectiveRegions
  class Engine < ::Rails::Engine
    engine_name 'effective_regions'

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

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

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

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

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
effective_regions-1.4.8 lib/effective_regions/engine.rb
effective_regions-1.4.7 lib/effective_regions/engine.rb
effective_regions-1.4.6 lib/effective_regions/engine.rb
effective_regions-1.4.5 lib/effective_regions/engine.rb
effective_regions-1.4.3 lib/effective_regions/engine.rb
effective_regions-1.4.2 lib/effective_regions/engine.rb
effective_regions-1.4.1 lib/effective_regions/engine.rb
effective_regions-1.4.0 lib/effective_regions/engine.rb
effective_regions-1.2.3 lib/effective_regions/engine.rb
effective_regions-1.2.2 lib/effective_regions/engine.rb
effective_regions-1.2.1 lib/effective_regions/engine.rb
effective_regions-1.2.0 lib/effective_regions/engine.rb
effective_regions-1.1.1 lib/effective_regions/engine.rb
effective_regions-1.1.0 lib/effective_regions/engine.rb
effective_regions-1.0.0 lib/effective_regions/engine.rb