Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add Pages numbers inverse #340

Closed
zephiro opened this Issue · 1 comment

2 participants

@zephiro

Hey can implementation inverse order of pages numbers ex.

normal order << 1, 2, 3, 4, 5, ... 10 >>

inverse order << 10, 9, 8, 7, 6, ... 1 >>

https://github.com/mislav/will_paginate/blob/master/lib/will_paginate/view_helpers/link_renderer.rb

Line 25 - 33

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

    @options[:container] ? html_container(html) : html
  end

pagination.reverse.map, implementing a method for this.

@mislav
Owner

This can be achieved by creating a custom link renderer. I won't include such feature in core.

@mislav mislav closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.