Sha256: 50ed96f18b592c8bbfe835cc0b0432ecafbc6a0e6d60567148d7e021f033738f

Contents?: true

Size: 1.03 KB

Versions: 9

Compression:

Stored size: 1.03 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'

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_method, :render_breadcrumbs
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
twitter-bootstrap-rails-2.2.6 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.2.5 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.2.4 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.2.3 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.2.1 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.2.0 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.1.9 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.1.8 lib/twitter/bootstrap/rails/engine.rb
twitter-bootstrap-rails-2.1.7 lib/twitter/bootstrap/rails/engine.rb