Skip to content

Commit 61b3c2a

Browse files
committed
Overwrite Bootstrap Link Renderer for WillPaginate
Without this fix, the new will_paginate version is not compatible with the old version of bootstrap-will_paginate. This issue is also tracked here: mislav/will_paginate#649 Fixes CODEOCEAN-QK
1 parent 677289e commit 61b3c2a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

config/initializers/monkey_patches.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@ def average
77
end
88
end
99
end
10+
11+
module WillPaginate
12+
module ActionView
13+
class Bootstrap4LinkRenderer
14+
def previous_or_next_page(page, text, classname, aria_label = nil)
15+
tag :li, link(text, page || '#', :class => 'page-link', :'aria-label' => aria_label), :class => [(classname[0..3] if @options[:page_links]), (classname if @options[:page_links]), ('disabled' unless page), 'page-item'].join(' ')
16+
end
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)