def will_paginate_with_bootstrap(collection = nil, options = {})
options[:renderer] = BootstrapLinkRenderer
options[:container] = false
will_paginate(collection,options)
end
class BootstrapLinkRenderer < WillPaginate::LinkRenderer
def initialize
@gap_marker = '<li class="disabled"><a href="#">...</a></li>'
end
protected
def page_link(page, text, attributes = {})
html = @template.link_to text, url_for(page), attributes
"<li> #{html} </li>"
end
def page_span(page, text, attributes = {})
html = @template.link_to text, '#'
"<li class=\"active\"> #{html} </li>"
end
end