Better comparison of "local" domain
This commit is contained in:
parent
b304cc07d5
commit
15d01a5e08
4 changed files with 7 additions and 3 deletions
|
@ -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?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue