[Rails] Pass template locations as an array of tuples instead of as a hash to preserve load path ordering.

Closes GH-128.
This commit is contained in:
Chris Eppstein 2010-05-08 23:38:35 -07:00
parent 76a12b4ea2
commit 5d0454dc02

View File

@ -8,13 +8,13 @@ module Compass
end end
def to_sass_plugin_options def to_sass_plugin_options
locations = {} locations = []
locations[sass_path] = css_path if sass_path && css_path locations << [sass_path, css_path] if sass_path && css_path
Compass::Frameworks::ALL.each do |framework| Compass::Frameworks::ALL.each do |framework|
locations[framework.stylesheets_directory] = css_path || css_dir || "." locations << [framework.stylesheets_directory, css_path || css_dir || "."]
end end
resolve_additional_import_paths.each do |additional_path| resolve_additional_import_paths.each do |additional_path|
locations[additional_path] = File.join(css_path || css_dir || ".", File.basename(additional_path)) locations << [additional_path, File.join(css_path || css_dir || ".", File.basename(additional_path))]
end end
plugin_opts = {:template_location => locations} plugin_opts = {:template_location => locations}
plugin_opts[:style] = output_style if output_style plugin_opts[:style] = output_style if output_style