bug fixes

This commit is contained in:
albert
2011-08-05 19:33:39 -04:00
parent c078178fc4
commit 4f0273143b
3 changed files with 17 additions and 7 deletions

View File

@@ -4,11 +4,18 @@ module PostSetPresenters
def initialize(post_set)
@post_set = post_set
@tag_set_presenter = TagSetPresenter.new(
RelatedTagCalculator.calculate_from_sample_to_array(
post_set.tag_string
).map {|x| x[0]}
)
@tag_set_presenter = TagSetPresenter.new(related_tags)
end
def related_tags
if post_set.is_single_tag?
tag = Tag.find_by_name(post_set.tag_string)
if tag
return tag.related_tag_array.map(&:first)
end
end
RelatedTagCalculator.calculate_from_sample_to_array(post_set.tag_string).map(&:first)
end
def posts