This commit is contained in:
albert
2013-02-24 11:46:58 -05:00
parent c43ae62cdf
commit 1fb2c78348
2 changed files with 2 additions and 2 deletions

View File

@@ -115,7 +115,7 @@ class ForumPost < ActiveRecord::Base
end
def forum_topic_page
((ForumPost.where("topic_id = ? and created_at < ?", topic_id, created_at).count + 1) / Danbooru.config.posts_per_page.to_f).ceil
((ForumPost.where("topic_id = ? and created_at <= ?", topic_id, created_at).count) / Danbooru.config.posts_per_page.to_f).ceil
end
def build_response

View File

@@ -56,7 +56,7 @@ class ForumTopic < ActiveRecord::Base
end
def last_page
((posts.count + 1) / Danbooru.config.posts_per_page.to_f).ceil
(posts.count / Danbooru.config.posts_per_page.to_f).ceil
end
def presenter(forum_posts)