add humanized tag string for posts
This commit is contained in:
@@ -15,6 +15,10 @@ module PostSets
|
||||
tag_array.uniq.join(" ")
|
||||
end
|
||||
|
||||
def humanized_tag_string
|
||||
"fav:#{user.pretty_name}"
|
||||
end
|
||||
|
||||
def posts
|
||||
favorites.order("favorites.id desc").includes(:post).map(&:post)
|
||||
end
|
||||
|
||||
@@ -37,6 +37,10 @@ module PostSets
|
||||
tag_array.join("")
|
||||
end
|
||||
|
||||
def humanized_tag_string
|
||||
"pool:#{pool.pretty_name}"
|
||||
end
|
||||
|
||||
def presenter
|
||||
@presenter ||= PostSetPresenters::Pool.new(self)
|
||||
end
|
||||
|
||||
@@ -11,6 +11,10 @@ module PostSets
|
||||
@tag_string ||= tag_array.uniq.join(" ")
|
||||
end
|
||||
|
||||
def humanized_tag_string
|
||||
tag_array.slice(0, 25).join(" ").tr("_", " ")
|
||||
end
|
||||
|
||||
def has_wiki?
|
||||
tag_array.any? && ::WikiPage.titled(tag_string).exists?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user