diff --git a/lib/bootstrap-sass.rb b/lib/bootstrap-sass.rb index e3ba2f7a..d827f85d 100644 --- a/lib/bootstrap-sass.rb +++ b/lib/bootstrap-sass.rb @@ -3,7 +3,7 @@ module Bootstrap # Inspired by Kaminari def self.load! - if rails? + if asset_pipeline? require 'sass-rails' # See: https://github.com/thomas-mcdonald/bootstrap-sass/pull/4 require 'bootstrap-sass/engine' require 'bootstrap-sass/config/sass_extentions' @@ -21,8 +21,8 @@ module Bootstrap end private - def self.rails? - defined?(::Rails) + def self.asset_pipeline? + defined?(::Rails) && ::Rails.version >= '3.1.0' end def self.compass? @@ -30,4 +30,4 @@ module Bootstrap end end -Bootstrap.load! \ No newline at end of file +Bootstrap.load!