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