From 15d01a5e08dd13b55d6b67ea26d56894487c09a9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 6 Oct 2016 16:36:16 +0200 Subject: Better comparison of "local" domain --- app/lib/tag_manager.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/lib') diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb index 4d29ca1f8..ad76d10c4 100644 --- a/app/lib/tag_manager.rb +++ b/app/lib/tag_manager.rb @@ -17,6 +17,10 @@ class TagManager id.start_with?("tag:#{Rails.configuration.x.local_domain}") end + def local_domain?(domain) + domain.nil? || domain.gsub(/[\/]/, '') == Rails.configuration.x.local_domain + end + def uri_for(target) return target.uri if target.respond_to?(:local?) && !target.local? -- cgit