mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
UX: Replace heuristic solution for extracting root domain.
This commit is contained in:
parent
3e9c3f6f13
commit
8491c5fba5
5 changed files with 29 additions and 8 deletions
|
@ -8,7 +8,8 @@ class TopicLinkSerializer < ApplicationSerializer
|
|||
:reflection,
|
||||
:clicks,
|
||||
:user_id,
|
||||
:domain
|
||||
:domain,
|
||||
:root_domain,
|
||||
|
||||
def url
|
||||
object['url']
|
||||
|
@ -50,4 +51,8 @@ class TopicLinkSerializer < ApplicationSerializer
|
|||
object['domain']
|
||||
end
|
||||
|
||||
def root_domain
|
||||
MiniSuffix.domain(domain)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue