Set wiki “base_path” option to fix “base_url”

If the “base_path” option of the wiki is not set, set it to the base url.
  It will make links work seamlessly when mounting to a relative url.
This commit is contained in:
Jean-Philippe Garcia Ballester
2012-07-24 23:46:22 +02:00
parent 4a63899722
commit 7c180c86a4
+1
View File
@@ -69,6 +69,7 @@ module Precious
before do
@base_url = url('/')
settings.wiki_options.merge!({ :base_path => @base_url }) unless settings.wiki_options.has_key? :base_path
end
get '/' do