1
0
Fork 0
mirror of https://github.com/twbs/bootstrap-sass.git synced 2022-11-09 12:27:02 -05:00

Make it work with Rails 2.3 and Compass.

This commit is contained in:
Hendy Tanata 2012-04-04 17:54:49 +08:00
parent 4a8dc21e86
commit 711f3b36c8

View file

@ -3,7 +3,7 @@ module Bootstrap
# Inspired by Kaminari # Inspired by Kaminari
def self.load! def self.load!
if rails? if rails_asset_pipeline?
require 'sass-rails' # See: https://github.com/thomas-mcdonald/bootstrap-sass/pull/4 require 'sass-rails' # See: https://github.com/thomas-mcdonald/bootstrap-sass/pull/4
require 'bootstrap-sass/engine' require 'bootstrap-sass/engine'
require 'bootstrap-sass/config/sass_extentions' require 'bootstrap-sass/config/sass_extentions'
@ -20,8 +20,8 @@ module Bootstrap
end end
private private
def self.rails? def self.rails_asset_pipeline?
defined?(::Rails) defined?(::Rails) && ::Rails.version >= '3.1.0'
end end
def self.compass? def self.compass?