2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: attachment links in topic map were giving 404

This commit is contained in:
Arpit Jalan 2015-05-28 15:07:49 +05:30
parent 23eadc3fb1
commit 5813cfd95b
2 changed files with 6 additions and 1 deletions

View file

@ -4,6 +4,7 @@ class TopicLinkSerializer < ApplicationSerializer
:title,
:fancy_title,
:internal,
:attachment,
:reflection,
:clicks,
:user_id,
@ -25,6 +26,10 @@ class TopicLinkSerializer < ApplicationSerializer
object['internal'] == 't'
end
def attachment
Discourse.store.has_been_uploaded?(object['url'])
end
def reflection
object['reflection'] == 't'
end