fix build

This commit is contained in:
Sam 2014-02-10 16:07:09 +11:00
parent 172d0ffd08
commit 4f6cef01e4
2 changed files with 9 additions and 4 deletions

View File

@ -43,17 +43,22 @@ class ListableTopicSerializer < BasicTopicSerializer
return nil unless object.user_data return nil unless object.user_data
object.user_data.last_read_post_number object.user_data.last_read_post_number
end end
alias :include_last_read_post_number? :seen
def has_user_data
!!object.user_data
end
alias :include_last_read_post_number? :has_user_data
def unread def unread
unread_helper.unread_posts unread_helper.unread_posts
end end
alias :include_unread? :seen alias :include_unread? :has_user_data
def new_posts def new_posts
unread_helper.new_posts unread_helper.new_posts
end end
alias :include_new_posts? :seen alias :include_new_posts? :has_user_data
def include_excerpt? def include_excerpt?
pinned pinned

View File

@ -13,7 +13,7 @@ class TopicListItemSerializer < ListableTopicSerializer
def starred def starred
object.user_data.starred? object.user_data.starred?
end end
alias :include_starred? :seen alias :include_starred? :has_user_data
def posters def posters
object.posters || [] object.posters || []