tag set presenter
This commit is contained in:
@@ -43,6 +43,10 @@ module PostSets
|
||||
tag_array.size == 1
|
||||
end
|
||||
|
||||
def is_empty_tag?
|
||||
tag_array.size == 0
|
||||
end
|
||||
|
||||
def current_page
|
||||
[page.to_i, 1].max
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class RelatedTagCalculator
|
||||
def self.find_tags(tag, limit)
|
||||
Post.tag_match(tag).limit(limit).select("posts.tag_string").order("posts.md5").map(&:tag_string)
|
||||
Post.tag_match(tag).limit(limit).select("posts.tag_string").reorder("posts.md5").map(&:tag_string)
|
||||
end
|
||||
|
||||
def self.calculate_from_sample_to_array(tags, category_constraint = nil)
|
||||
|
||||
Reference in New Issue
Block a user