Skip to content

Commit e5cf2ef

Browse files
committed
Bump to pagy 43.x
1 parent 66a6659 commit e5cf2ef

File tree

6 files changed

+6
-13
lines changed

6 files changed

+6
-13
lines changed

app/controllers/redis_web_manager/application_controller.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
# frozen_string_literal: true
22

3-
require 'pagy'
4-
require 'pagy/extras/array'
5-
require 'pagy/extras/bootstrap'
6-
73
module RedisWebManager
84
class ApplicationController < ActionController::Base
9-
include ::Pagy::Backend
5+
include ::Pagy::Method
106

117
protect_from_forgery with: :exception
128

app/controllers/redis_web_manager/keys_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class KeysController < ApplicationController # rubocop:disable Metrics/ClassLeng
77
def index
88
@status = info.status
99
@url = connection.id
10-
@pagy, @keys = pagy_array(keys)
10+
@pagy, @keys = pagy(:offset, keys)
1111
end
1212

1313
# GET /key/:key

app/helpers/redis_web_manager/application_helper.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
module RedisWebManager
44
module ApplicationHelper
5-
require 'pagy'
6-
7-
include ::Pagy::Frontend
8-
95
def status(value)
106
if value
117
content_tag(:kbd, 'ON', class: 'bg-success bounce')

app/views/redis_web_manager/keys/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
</div>
4646
</div>
4747
<div class="d-flex align-items-center justify-content-center mt-3">
48-
<%= pagy_bootstrap_nav(@pagy).html_safe %>
48+
<%= @pagy.series_nav(:bootstrap).html_safe %>
4949
</div>
5050
</div>
5151
</div>
52-
</div>
52+
</div>

lib/redis_web_manager.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# require external dependencies
44
require 'active_support/time'
5+
require 'pagy'
56
require 'redis'
67

78
# require internal dependencies

redis_web_manager.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
2626
'app/**/*.css'
2727
]
2828

29-
s.add_dependency 'pagy', '>= 5.0'
29+
s.add_dependency 'pagy', '>= 43.0'
3030
s.add_dependency 'rails', '>= 7.2'
3131
s.add_dependency 'redis', '>= 4.1.0'
3232
s.add_dependency 'sprockets-rails', '>= 3.4.0'

0 commit comments

Comments
 (0)