Sha256: 907e9ef82bd3a899bc8a1a309ad01637042f262d168b4a8a9657599323ba2970

Contents?: true

Size: 1.23 KB

Versions: 4

Compression:

Stored size: 1.23 KB

Contents

require 'rails'

require File.dirname(__FILE__) + '/twitter-bootstrap-breadcrumbs.rb'
require File.dirname(__FILE__) + '/../../../../app/helpers/flash_block_helper.rb'
require File.dirname(__FILE__) + '/../../../../app/helpers/modal_helper.rb'
require File.dirname(__FILE__) + '/../../../../app/helpers/navbar_helper.rb'

module Twitter
  module Bootstrap
    module Rails
      class Engine < ::Rails::Engine
        initializer 'twitter-bootstrap-rails.setup',
          :after => 'less-rails.after.load_config_initializers',
          :group => :all do |app|
            if defined?(Less)
              app.config.less.paths << File.join(config.root, 'vendor', 'toolkit')
            end
          end

        initializer 'twitter-bootstrap-rails.setup_helpers' do |app|
          app.config.to_prepare do
            ActionController::Base.send :include, BreadCrumbs
            ActionController::Base.send :helper, FlashBlockHelper
            ActionController::Base.send :helper, ModalHelper
            ActionController::Base.send :helper, NavbarHelper
            ActionController::Base.send :helper, BadgeLabelHelper
            #ActionController::Base.send :helper_method, :render_breadcrumbs
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
twitter-bootstrap3-rails-3.2.7.1 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap3-rails-3.2.7 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.2.8 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.2.7 lib/twitter/bootstrap/rails/engine.rb