diff --git a/lib/compass/app_integration/rails.rb b/lib/compass/app_integration/rails.rb index d1f370ae..430e4c2c 100644 --- a/lib/compass/app_integration/rails.rb +++ b/lib/compass/app_integration/rails.rb @@ -34,6 +34,13 @@ module Compass end end + def initialize! + rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s + Compass.add_project_configuration(File.join(root, "config", "compass.rb")) + Compass.discover_extensions! + Compass.configure_sass_plugin! + Compass.handle_configuration_change! + end end end end diff --git a/lib/compass/app_integration/rails/installer.rb b/lib/compass/app_integration/rails/installer.rb index 9652c0e3..68e6a021 100644 --- a/lib/compass/app_integration/rails/installer.rb +++ b/lib/compass/app_integration/rails/installer.rb @@ -105,10 +105,8 @@ NEXTSTEPS def initializer_contents %Q{require 'compass' - |rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s - |Compass.add_project_configuration(File.join(rails_root, "config", "compass.rb")) - |Compass.configure_sass_plugin! - |Compass.handle_configuration_change! + |require 'compass/app_integration/rails' + |Compass::AppIntegration::Rails.initialize! |}.gsub(/^\s+\|/,'') end