From 0c1342746e5e34905c0a215f4c943e0fb0b3524e Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 18 Jul 2011 22:00:06 -0700 Subject: [PATCH] Better configuration defaults for rails31 --- .../rails/configuration_defaults.rb | 20 +++++++++++++++++++ lib/compass/configuration/defaults.rb | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/compass/app_integration/rails/configuration_defaults.rb b/lib/compass/app_integration/rails/configuration_defaults.rb index 06aaf311..2170f0f7 100644 --- a/lib/compass/app_integration/rails/configuration_defaults.rb +++ b/lib/compass/app_integration/rails/configuration_defaults.rb @@ -21,6 +21,26 @@ module Compass def default_javascripts_dir File.join("app", "assets", "javascripts") end + + def default_http_path + ::Rails.application.config.assets.prefix + end + + def default_http_images_path + "#{top_level.http_path}" + end + + def default_http_javascripts_path + "#{top_level.http_path}" + end + + def default_http_fonts_path + "#{top_level.http_path}" + end + + def default_http_stylesheets_path + "#{top_level.http_path}" + end end module ConfigurationDefaults diff --git a/lib/compass/configuration/defaults.rb b/lib/compass/configuration/defaults.rb index 236ce672..403b185c 100644 --- a/lib/compass/configuration/defaults.rb +++ b/lib/compass/configuration/defaults.rb @@ -10,7 +10,7 @@ module Compass :stand_alone end - def http_path_without_default + def default_http_path "/" end