allow 500 items per page
This commit is contained in:
parent
0fa9bebac9
commit
f71b78665e
2 changed files with 2 additions and 2 deletions
app
|
@ -143,7 +143,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def items_per_page
|
||||
if params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100
|
||||
if params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 500
|
||||
@per_page = params[:per_page].to_i
|
||||
else
|
||||
@per_page = 20
|
||||
|
|
|
@ -29,7 +29,7 @@ module ApplicationHelper
|
|||
|
||||
# Link-collection for per_page-options when using the pagination-plugin
|
||||
def items_per_page(options = {})
|
||||
per_page_options = options[:per_page_options] || [20, 50, 100]
|
||||
per_page_options = options[:per_page_options] || [20, 50, 100, 500]
|
||||
current = options[:current] || @per_page
|
||||
params = params || {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue