post index noe works

This commit is contained in:
albert
2011-06-24 18:22:54 -04:00
parent 9ac7f85f0b
commit 1ad075c05a
17 changed files with 91 additions and 136 deletions

View File

@@ -4,7 +4,7 @@ module PostSets
def initialize(params)
@tag_array = Tag.scan_query(params[:tags])
@page = [params[:page].to_i, 1].max
@page = params[:page]
@posts = ::Post.tag_match(tag_string).paginate(page)
end
@@ -13,7 +13,7 @@ module PostSets
end
def has_wiki?
if tags.any?
if tag_array.any?
::WikiPage.titled(tag_string).exists?
else
false
@@ -21,7 +21,7 @@ module PostSets
end
def wiki_page
if tags.any?
if tag_array.any?
::WikiPage.titled(tag_string).first
else
nil