diff --git a/app/controllers/admin/posts_controller.rb b/app/controllers/admin/posts_controller.rb index bf7c8a0..d583c48 100644 --- a/app/controllers/admin/posts_controller.rb +++ b/app/controllers/admin/posts_controller.rb @@ -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 diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb index ed1fe79..0f238a6 100644 --- a/config/initializers/kaminari_config.rb +++ b/config/initializers/kaminari_config.rb @@ -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