Sha256: 4369910aa2557bdd6cbb2e8dd082b003e1b5f9f31adca78ecbfd81b277e165e7
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
require_relative '../../app/models/concerns/acts_as_trashable.rb' 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
effective_trash-0.4.5 | lib/effective_trash/engine.rb |
effective_trash-0.4.4 | lib/effective_trash/engine.rb |
effective_trash-0.4.3 | lib/effective_trash/engine.rb |