Sha256: 46422b0457c83bcb459fa0e173ad475c9e01a8ca218ef9f251ee4ce81e039ed8
Contents?: true
Size: 1.08 KB
Versions: 9
Compression:
Stored size: 1.08 KB
Contents
module EffectiveResources class Engine < ::Rails::Engine engine_name 'effective_resources' config.autoload_paths += Dir["#{config.root}/lib/", "#{config.root}/app/controllers/concerns/effective/"] # Set up our default configuration options. initializer 'effective_resources.defaults', before: :load_config_initializers do |app| eval File.read("#{config.root}/config/effective_resources.rb") end # Register the flash_messages concern so that it can be called in ActionController initializer 'effective_resources.action_controller' do |app| ActiveSupport.on_load :action_controller do include(Effective::FlashMessages) end end # Include acts_as_addressable concern and allow any ActiveRecord object to call it initializer 'effective_resources.active_record' do |app| ActiveSupport.on_load :active_record do ActiveRecord::Base.extend(ActsAsTokened::ActiveRecord) ActiveRecord::Base.extend(ActsAsSlugged::ActiveRecord) ActiveRecord::Base.extend(EffectiveResource::ActiveRecord) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems