Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
stricter match to allow permalinks like 'home-2'
  • Loading branch information
TomK32 authored and Sven Fuchs committed Jul 14, 2008
1 parent c41677a commit 1b02ad4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vendor/engines/adva_wiki/app/helpers/wiki_helper.rb
Expand Up @@ -8,7 +8,7 @@ def included(base)
alias :wikipage_#{kind}_with_home :wikipage_#{kind}
def wikipage_#{kind}(*args)
returning wikipage_#{kind}_with_home(*args) do |url|
url.sub! %r(/pages/home\\b), ''
url.sub! %r(/pages/home$), ''
end
end
CODE
Expand Down Expand Up @@ -43,7 +43,7 @@ def wiki_edit_links(wikipage, options = {})
separator = options[:separator] || ' · '

links = []
links << link_to('return to home', wiki_path(@section)) + separator unless wikipage.permalink == "home"
links << link_to('return to home', wiki_path(@section)) + separator unless wikipage.home?

if wikipage.version == wikipage.versions.last.version
links << authorized_tag(:span, :update, wikipage) do
Expand Down

0 comments on commit 1b02ad4

Please sign in to comment.