This commit is contained in:
John Bintz 2012-06-20 15:18:49 -04:00
parent 07e37d0521
commit 60cb10c4ca
1 changed files with 1 additions and 1 deletions

View File

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