📅  最后修改于: 2022-03-11 15:04:47.795000             🧑  作者: Mango
## perform a paginated query:
@posts = Post.paginate(page: params[:page])
# or, use an explicit "per page" limit:
Post.paginate(page: params[:page], per_page: 30)
## render page links in the view:
<%= will_paginate @posts %>