Skip to content

Commit 75de772

Browse files
committed
Views shouldn't have to know our URL scheme
1 parent 74879ed commit 75de772

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

git-wiki.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ def all_page_blobs
1818
obj.kind_of?(Grit::Blob) && obj.name.end_with?(@extension)
1919
end
2020
end
21+
def list_url
22+
"/pages/"
23+
end
2124
end
2225
end
2326

views/layout.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
%li
1717
%a.log{:href => @page.log_url}> log
1818
%li
19-
%a.list{:href => '/pages/'}> all
19+
%a.list{:href => GitWiki.list_url}> all
2020
#content= yield

0 commit comments

Comments
 (0)