summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 72b76b8..87aa82c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -12,13 +12,7 @@ module ApplicationHelper
12 end 12 end
13 end 13 end
14 14
15 def safe_return_to(url) 15 def resolve_kind_text(value)
16 return events_path if url.blank? 16 value.respond_to?(:call) ? value.call : value
17 uri = URI.parse(url)
18 return events_path if uri.host.present?
19 return events_path unless url.start_with?('/')
20 url
21 rescue URI::InvalidURIError
22 events_path
23 end 17 end
24end 18end