This commit is contained in:
John Bintz 2012-06-20 15:18:49 -04:00
parent 07e37d0521
commit 60cb10c4ca

View File

@ -128,7 +128,7 @@ module Locomotive
def self.url_for(path) def self.url_for(path)
result = path result = path
if config.base_uri if config.base_uri && !path[%r{^#{config.base_uri}}]
result = "#{config.base_uri}/#{path.gsub(%r{^/}, '')}" result = "#{config.base_uri}/#{path.gsub(%r{^/}, '')}"
end end
result = "/#{result}" if result[0..0] != '/' result = "/#{result}" if result[0..0] != '/'