Don't nuke the css files due to config changes during rails boot unless compilation is enabled.
This commit is contained in:
parent
2c1fcfcad7
commit
33263caffe
@ -58,6 +58,16 @@ module Compass
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def sass_plugin_enabled?
|
||||||
|
unless Sass::Util.ap_geq?('3.1.0.beta')
|
||||||
|
defined?(Sass::Plugin) && !Sass::Plugin.options[:never_update]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def rails_compilation_enabled?
|
||||||
|
Sass::Util.ap_geq?('3.1.0.beta') && defined?(Sass::Rails) # XXX check if there's some other way(s) to disable the asset pipeline.
|
||||||
|
end
|
||||||
|
|
||||||
# Rails 2.x projects use this in their compass initializer.
|
# Rails 2.x projects use this in their compass initializer.
|
||||||
def initialize!(config = nil)
|
def initialize!(config = nil)
|
||||||
check_for_double_boot!
|
check_for_double_boot!
|
||||||
@ -65,7 +75,7 @@ module Compass
|
|||||||
Compass.add_project_configuration(config, :project_type => :rails)
|
Compass.add_project_configuration(config, :project_type => :rails)
|
||||||
Compass.discover_extensions!
|
Compass.discover_extensions!
|
||||||
Compass.configure_sass_plugin!
|
Compass.configure_sass_plugin!
|
||||||
Compass.handle_configuration_change!
|
Compass.handle_configuration_change! if sass_plugin_enabled? || rails_compilation_enabled?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user