Sha256: cb3ffa47129feac925cf7f2aed0fee70e85802150bc8a1246ea93bb2d5c5d24e

Contents?: true

Size: 1.02 KB

Versions: 14

Compression:

Stored size: 1.02 KB

Contents

module EffectiveTrash
  class Engine < ::Rails::Engine
    engine_name 'effective_trash'

    config.autoload_paths += Dir["#{config.root}/lib/"]

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

    # Include acts_as_trashable concern and allow any ActiveRecord object to call it with acts_as_trashable()
    initializer 'effective_trash.active_record' do |app|
      ActiveSupport.on_load :active_record do
        ActiveRecord::Base.extend(ActsAsTrashable::ActiveRecord)
      end
    end

    # Register the log_page_views concern so that it can be called in ActionController or elsewhere
    initializer 'effective_trash.action_controller' do |app|
      Rails.application.config.to_prepare do
        ActiveSupport.on_load :action_controller do
          ActionController::Base.include(EffectiveTrash::SetCurrentUser::ActionController)
        end
      end
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
effective_trash-0.4.2 lib/effective_trash/engine.rb
effective_trash-0.4.1 lib/effective_trash/engine.rb
effective_trash-0.4.0 lib/effective_trash/engine.rb
effective_trash-0.3.3 lib/effective_trash/engine.rb
effective_trash-0.3.2 lib/effective_trash/engine.rb
effective_trash-0.3.1 lib/effective_trash/engine.rb
effective_trash-0.3.0 lib/effective_trash/engine.rb
effective_trash-0.2.6 lib/effective_trash/engine.rb
effective_trash-0.2.5 lib/effective_trash/engine.rb
effective_trash-0.2.4 lib/effective_trash/engine.rb
effective_trash-0.2.3 lib/effective_trash/engine.rb
effective_trash-0.2.2 lib/effective_trash/engine.rb
effective_trash-0.2.1 lib/effective_trash/engine.rb
effective_trash-0.2.0 lib/effective_trash/engine.rb