Sha256: c10454cb92a05cfe52dfe63a0f79b76e7dc6996f5b99a176c9a33f6419d2ef3e

Contents?: true

Size: 748 Bytes

Versions: 3

Compression:

Stored size: 748 Bytes

Contents

module Impressionizer

  class Engine < Rails::Engine

    initializer "impressionizer.load_app_instance_data" do |app|
      Impressionizer.setup do |config|
        config.app_root = app.root
      end
    end

    initializer "impressionizer.load_static_assets" do |app|
      app.middleware.use ::ActionDispatch::Static, "#{root}/public"
    end
    
    initializer 'impressionizer.extend_ar' do |app|
      ActiveRecord::Base.extend Impressionizer::Impressionable
    end
    
    initializer 'impressionizer.controller' do
      ActiveSupport.on_load(:action_controller) do
        include Impressionizer::ImpressionsController::InstanceMethods
        extend Impressionizer::ImpressionsController::ClassMethods
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
impressionizer-0.0.4 lib/impressionizer/engine.rb
impressionizer-0.0.3 lib/impressionizer/engine.rb
impressionizer-0.0.2 lib/impressionizer/engine.rb