Ensure page_route starts with a leading slash (#1604)

* Ensure page_route starts with a leading slash

* Handle base_url = nil in page_route()

* Refactor page_route()
This commit is contained in:
Watal M. Iwasaki
2020-08-04 01:09:57 +09:00
committed by GitHub
parent 627ee5bbbe
commit 5a95f79b32
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
<div class="TableObject">
<div class="TableObject-item">
<a class="btn" id="minibutton-home" href="{{page_route}}/">Home</a>
<a class="btn" id="minibutton-home" href="{{page_route}}">Home</a>
</div>
+1 -1
View File
@@ -54,7 +54,7 @@ module Precious
end
def page_route(page = nil)
clean_url(@base_url, page)
clean_url("/#{@base_url}", page)
end
def clean_url(*url)