Sha256: e313bea37c81ec02cbda36b91dc85827dd30c1764b07973c16d283a16823d71c

Contents?: true

Size: 814 Bytes

Versions: 1

Compression:

Stored size: 814 Bytes

Contents

require 'tb_core'

module TbRedirects
  class Engine < ::Rails::Engine
    engine_name 'tb_redirects'
    config.autoload_paths += Dir["#{config.root}/lib/**/"]

    config.generators do |g|
      g.test_framework :rspec, fixture: false
      g.fixture_replacement :factory_girl, dir: 'spec/factories'
      g.assets false
      g.helper true
    end

    initializer 'tb_redirects.admin', before: 'tb_core.admin' do |_config|
      Spud::Core.admin_applications += [
        { name: 'Redirects', key: :tb_redirects, thumbnail: 'admin/module_icon.png', url: '/admin/redirects' }
      ]
    end

    initializer 'tb_redirects.controllers' do |_config|
      ActiveSupport.on_load(:action_controller) do
        TbCore::ApplicationController.send :include, TbRedirects::HandleRedirects
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tb_redirects-1.0.1 lib/tb_redirects/engine.rb