mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 10:38:14 +08:00
f05da14fb6
These accidental inclusions are mostly no-ops (because the method name is also included as an explicit symbol). The mistakes were made more obvious because syntax_tree adjusted the indentation of these methods
27 lines
511 B
Ruby
27 lines
511 B
Ruby
# frozen_string_literal: true
|
|
|
|
class TopicLinkSerializer < ApplicationSerializer
|
|
attributes :url,
|
|
:title,
|
|
# :fancy_title,
|
|
:internal,
|
|
:attachment,
|
|
:reflection,
|
|
:clicks,
|
|
:user_id,
|
|
:domain,
|
|
:root_domain
|
|
|
|
def attachment
|
|
Discourse.store.has_been_uploaded?(object.url)
|
|
end
|
|
|
|
def include_user_id?
|
|
object.user_id.present?
|
|
end
|
|
|
|
def root_domain
|
|
MiniSuffix.domain(domain)
|
|
end
|
|
end
|