fix forum last page

This commit is contained in:
albert
2013-03-22 21:02:10 -04:00
parent 48b1f63028
commit 6f5c29df37
2 changed files with 2 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ class ForumPost < ActiveRecord::Base
end
def forum_topic_page
((ForumPost.where("topic_id = ? and created_at <= ?", topic_id, created_at).count) / Danbooru.config.posts_per_page.to_f).ceil
((ForumPost.where("topic_id = ? and created_at <= ?", topic_id, created_at).count) / CurrentUser.user.per_page.to_f).ceil
end
def is_original_post?

View File

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