Fix to_url so it correctly handles _Header, _Footer, and _Sidebar.

This commit is contained in:
bootstraponline
2012-07-11 20:10:59 -06:00
parent ff78998829
commit 67de8e6a3a
+10
View File
@@ -12,6 +12,16 @@ require 'gollum/frontend/views/has_page'
require File.expand_path '../uri_encode_component', __FILE__
require File.expand_path '../helpers', __FILE__
# Fix to_url
class String
alias :upstream_to_url :to_url
# _Header => header which causes errors
def to_url
return self if ['_Header', '_Footer', '_Sidebar'].include? self
upstream_to_url
end
end
# Run the frontend, based on Sinatra
#
# There are a number of wiki options that can be set for the frontend