FIX: Don't return the last post we already have when paginating /posts (#30991)

This commit is contained in:
Rafael dos Santos Silva 2025-01-24 16:42:22 -03:00 committed by GitHub
parent 9cc99ef6db
commit 59a6775848
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ class PostsController < ApplicationController
@use_canonical = true
end
posts = posts.where("posts.id <= ?", last_post_id) if last_post_id
posts = posts.where("posts.id < ?", last_post_id) if last_post_id
posts = posts.to_a