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