Open ePirat opened 11 years ago
Specifying a negative value for the page GET parameter on the blog page will cause an internal server error, example: http://schnitzelpress.org/blog/?page=-1
page
This can be fixed by checking in render_blog in blog.rb:
render_blog
def render_blog total_count = Post.latest.count skipped_count = (params[:page].to_i > 0) ? (params[:page].to_i * 10) : 0 @posts = Post.latest.skip(skipped_count).limit(10) displayed_count = @posts.count(true) @show_previous_posts_button = total_count > skipped_count + displayed_count render_posts end
Specifying a negative value for the
page
GET parameter on the blog page will cause an internal server error, example: http://schnitzelpress.org/blog/?page=-1This can be fixed by checking in
render_blog
in blog.rb: