Adjust paginator window argument
This commit is contained in:
parent
3615504b76
commit
02f09f1d38
|
@ -22,7 +22,7 @@ class Admin::PostsController < ApplicationController
|
|||
end
|
||||
|
||||
def index
|
||||
@posts = Post.order(created_at: :desc).page(params[:page]).per(1)
|
||||
@posts = Post.order(created_at: :desc).page(params[:page])
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
Kaminari.configure do |config|
|
||||
config.default_per_page = 10
|
||||
# config.max_per_page = nil
|
||||
# config.window = 4
|
||||
config.window = 2
|
||||
# config.outer_window = 0
|
||||
# config.left = 0
|
||||
# config.right = 0
|
||||
config.left = 0
|
||||
config.right = 0
|
||||
# config.page_method_name = :page
|
||||
# config.param_name = :page
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue