Browse files

added pagination per page to config

  • Loading branch information...
1 parent dfd7dd2 commit 29c451faa6541ece0baa916cedeeece65cf1f0d0 @jcieslar committed Aug 28, 2012
View
2 app/controllers/customize_admin/base_controller.rb
@@ -8,7 +8,7 @@ class BaseController < ApplicationController
protected
def collection
- collection = search(params[:search]).order( sort_column + " " + sort_direction ).paginate(:per_page => 10, :page => params[:page])
+ collection = search(params[:search]).order( sort_column + " " + sort_direction ).paginate(:per_page => CustomizeAdmin.per_page, :page => params[:page])
end
def sort_column
View
1 lib/generators/customize_admin/install/templates/customize_admin.rb
@@ -2,4 +2,5 @@
# Many of these configuration options can be set straight in your model.
CustomizeAdmin.setup do |config|
config.name_space = "<%= @name_space %>"
+ config.per_page = 50
end

0 comments on commit 29c451f

Please sign in to comment.