FEATURE: remove star concept from Discourse

This commit is contained in:
Sam
2015-01-07 12:19:23 +11:00
parent fa8493118b
commit efc717c14a
35 changed files with 50 additions and 448 deletions

View File

@@ -2,7 +2,6 @@ class TopicListItemSerializer < ListableTopicSerializer
attributes :views,
:like_count,
:starred,
:has_summary,
:archetype,
:last_poster_username,
@@ -13,12 +12,6 @@ class TopicListItemSerializer < ListableTopicSerializer
has_many :posters, serializer: TopicPosterSerializer, embed: :objects
has_many :participants, serializer: TopicPosterSerializer, embed: :objects
def starred
object.user_data.starred?
end
alias :include_starred? :has_user_data
def posters
object.posters || []
end

View File

@@ -29,7 +29,6 @@ class TopicViewSerializer < ApplicationSerializer
attributes :draft,
:draft_key,
:draft_sequence,
:starred,
:posted,
:unpinned,
:pinned_globally,
@@ -145,11 +144,6 @@ class TopicViewSerializer < ApplicationSerializer
object.topic_user.present?
end
def starred
object.topic_user.starred?
end
alias_method :include_starred?, :has_topic_user?
def highest_post_number
object.highest_post_number
end