How to rename a method of a module

I’m using the gem bootstrap-will_paginate and inside this gem there is
the initializer:

require ‘will_paginate/view_helpers/action_view’

module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {})
options, collection = collection, nil if collection.is_a? Hash
# Taken from original will_paginate code to handle if the helper
is not passed a collection object.
collection ||= infer_collection_from_controller
options[:renderer] ||= BootstrapLinkRenderer
super.try :html_safe
end

So when I call will_paginate it’s rendered using BootstrapLinkRenderer.
I want to rename the method name will_paginate in, for example
bootstrap-will_paginate, so that I can use will_paginate with its own
render and bootstrap-will_paginate with BootstrapLinkRenderer.
How can I do this?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs