このコミットが含まれているのは:
2025-07-11 02:05:16 +09:00
コミット 3c89d14636
9個のファイルの変更191行の追加66行の削除
+2 -6
ファイルの表示
@@ -6,14 +6,10 @@ class PostsController < ApplicationController
# GET /posts
def index
limit = (params[:limit] || 20).to_i
cursor = params[:cursor]
cursor = params[:cursor].presence
q = filtered_posts.order(created_at: :desc)
next_cursor = nil
if cursor.present?
q = q.where('posts.created_at < ?', Time.iso8601(cursor))
end
q = q.where('posts.created_at < ?', Time.iso8601(cursor)) if cursor
posts = q.limit(limit + 1)