mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
更改:分页大小最高限制为50
This commit is contained in:
@@ -665,7 +665,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
def kaminari_paginate(relation)
|
||||
limit = params[:limit] || params[:per_page]
|
||||
limit = (limit.to_i.zero? || limit.to_i > 25) ? 25 : limit.to_i
|
||||
limit = (limit.to_i.zero? || limit.to_i > 50) ? 50 : limit.to_i
|
||||
page = params[:page].to_i.zero? ? 1 : params[:page].to_i
|
||||
|
||||
relation.page(page).per(limit)
|
||||
|
||||
Reference in New Issue
Block a user