Module: RailsAdmin::Bootstrap

Defined in:
lib/rails_admin/bootstrap-sass.rb

Defined Under Namespace

Classes: FrameworkNotFound

Class Method Summary collapse

Class Method Details

.load!Object

Inspired by Kaminari


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/rails_admin/bootstrap-sass.rb', line 6

def self.load!
  if compass?
    require 'rails_admin/bootstrap-sass/compass_functions'
    register_compass_extension
  elsif asset_pipeline?
    require 'rails_admin/bootstrap-sass/sass_functions'
  end

  require 'sass-rails' if rails?

  unless rails? || compass?
    fail(Bootstrap::FrameworkNotFound.new('bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded'))
  end

  stylesheets = File.expand_path(File.join('..', 'vendor', 'assets', 'stylesheets'))
  ::Sass.load_paths << stylesheets
end