This commit is contained in:
bootstraponline
2012-10-13 13:04:51 -06:00
parent 432f9b8d2f
commit 5401cf2910
3 changed files with 10 additions and 3 deletions
+7
View File
@@ -23,5 +23,12 @@ module Precious
return url if url.nil?
url.gsub('%2F','/').gsub(/^\/+/,'')
end
def trim_leading_slash url
return url if url.nil?
url.gsub!('%2F','/')
return '/' + url.gsub(/^\/+/,'') if url[0,1] == '/'
url
end
end
end