summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/helpers/application_helper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a9a7dc9..15493e1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -9,10 +9,11 @@ module ApplicationHelper
end
#
- # two forms:
+ # three forms:
#
# (1) link('page-name')
# (2) link('label' => 'page-name')
+ # (3) link('label' => 'https://url')
#
# both accept optional options hash:
#
@@ -31,6 +32,8 @@ module ApplicationHelper
end
if name.starts_with?('#')
path = name
+ elsif name.starts_with?('http')
+ path = name
else
page = StaticPage.find(name)
if page