From 711f3b36c8f3c0d180b7acf86f242bb9f62047a1 Mon Sep 17 00:00:00 2001 From: Hendy Tanata Date: Wed, 4 Apr 2012 17:54:49 +0800 Subject: [PATCH] Make it work with Rails 2.3 and Compass. --- lib/bootstrap-sass.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bootstrap-sass.rb b/lib/bootstrap-sass.rb index 05da7051..ac8870a9 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 rails_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' @@ -20,8 +20,8 @@ module Bootstrap end private - def self.rails? - defined?(::Rails) + def self.rails_asset_pipeline? + defined?(::Rails) && ::Rails.version >= '3.1.0' end def self.compass?