about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-10 19:11:41 -0400
committerEugen <eugen@zeonfederated.com>2017-04-11 01:11:41 +0200
commit4ada50985a73ed5c859cdf5160500b04116ad0e4 (patch)
tree6e51b5cf970bc4f945834e65bf8bd37b1ef8fb5f /config/initializers
parenta28378646393de998663981e6660eb79e7a6375f (diff)
Pagination improvements (#1445)
* Replace will_paginate with kaminari

* Use #page instead of #paginate in controllers

* Replace will_paginate.page_gap with pagination.truncate in i18n

* Customize kaminari views to match prior styles

* Set kaminari options to match prior behavior

* Replace will_paginate with paginate in views
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/kaminari_config.rb7
-rw-r--r--config/initializers/pagination.rb0
2 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb
new file mode 100644
index 000000000..bd455f382
--- /dev/null
+++ b/config/initializers/kaminari_config.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+Kaminari.configure do |config|
+  config.default_per_page = 40
+  config.window = 1
+  config.left = 3
+  config.right = 1
+end
diff --git a/config/initializers/pagination.rb b/config/initializers/pagination.rb
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/config/initializers/pagination.rb