Sha256: e472f5ec66bbf9e745d5af66820a7240b238200ae30b72de5e345a6e04b60edb

Contents?: true

Size: 1.17 KB

Versions: 60

Compression:

Stored size: 1.17 KB

Contents

module EffectiveBootstrap
  class Engine < ::Rails::Engine
    engine_name 'effective_bootstrap'

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

    initializer 'effective_bootstrap.assets' do |app|
      app.config.assets.precompile += [
        'effective_bootstrap_manifest.js',
        'effective_bootstrap_article_editor.css',
        'icons/*'
      ]
    end

    initializer 'effective_bootstrap.action_text' do |app|
      if defined?(ActionText)
        ActionText::ContentHelper.allowed_attributes << 'style'
      end
    end

    # Adds a before_action to application controller
    initializer 'effective_bootstrap.action_controller' do |app|
      if EffectiveBootstrap.save_tabs
        app.config.to_prepare do
          ApplicationController.send(:include, EffectiveBootstrap::SaveTabs)
        end
      end
    end

    initializer 'effective_bootstrap.action_mailer' do |app|
      app.config.to_prepare do
        ActionMailer::Base.send(:helper, EffectiveArticleEditorHelper)
      end
    end

  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
effective_bootstrap-1.17.4 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.17.3 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.17.2 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.17.1 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.17.0 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.16.4 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.16.3 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.16.2 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.16.1 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.16.0 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.15.6 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.15.5 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.15.4 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.15.3 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.15.2 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.15.1 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.15.0 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.14.17 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.14.16 lib/effective_bootstrap/engine.rb
effective_bootstrap-1.14.15 lib/effective_bootstrap/engine.rb