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