Class: Integral::BootstrapPaginationRenderer

Inherits:
WillPaginate::ActionView::LinkRenderer
  • Object
show all
Defined in:
lib/integral/bootstrap_pagination_renderer.rb

Instance Method Summary collapse

Instance Method Details

#container_attributesObject

Container attributes



13
14
15
# File 'lib/integral/bootstrap_pagination_renderer.rb', line 13

def container_attributes
  super.except(:link_options)
end

#to_htmlObject

Pagination container



4
5
6
7
8
9
10
# File 'lib/integral/bootstrap_pagination_renderer.rb', line 4

def to_html
  list_items = pagination.map do |item|
    item.is_a?(Integer) ? page_number(item) : send(item)
  end.join(@options[:link_separator])

  tag(:ul, list_items, class: "pagination #{@options[:class]}")
end