show tags for tag subscriptions in post listing

This commit is contained in:
albert
2013-02-18 20:18:21 -05:00
parent a62fadd0ae
commit 02360c53c7
4 changed files with 17 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ module PostSets
def has_wiki?
tag_array.any? && ::WikiPage.titled(tag_string).exists?
end
def wiki_page
if tag_array.any?
::WikiPage.titled(tag_string).first
@@ -75,6 +75,18 @@ module PostSets
[page.to_i, 1].max
end
def is_tag_subscription?
tag_subscription.present?
end
def tag_subscription
@tag_subscription ||= tag_array.select {|x| x =~ /^sub:/}.map {|x| x.sub(/^sub:/, "")}.first
end
def tag_subscription_tags
@tag_subscription_tags ||= TagSubscription.find_tags(tag_subscription)
end
def presenter
@presenter ||= ::PostSetPresenters::Post.new(self)
end