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: https://github.com/mislav/will_paginate/issues/649 Fixes CODEOCEAN-QK
This commit is contained in:
@ -7,3 +7,13 @@ unless Array.respond_to?(:average)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module WillPaginate
|
||||
module ActionView
|
||||
class Bootstrap4LinkRenderer
|
||||
def previous_or_next_page(page, text, classname, aria_label = nil)
|
||||
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(' ')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user