modify per_page max 100

dev_winse
p31729568 6 years ago
parent e002d9f1eb
commit 0d8de9537a

@ -37,7 +37,7 @@ class Users::BaseController < ApplicationController
end
def per_page_value
params[:per_page].to_i > 0 && params[:per_page].to_i < 50 ? params[:per_page].to_i : 20
params[:per_page].to_i > 0 && params[:per_page].to_i <= 100 ? params[:per_page].to_i : 20
end
alias_method :limit_value, :per_page_value

Loading…
Cancel
Save