Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

I think there is a bug about customized page gap. #213

Closed
wants to merge 1 commit into from

2 participants

@keating

If there is a customized page gap, it should be used instead of the default one.

@keating

It's not serious, when I use config file, everything goes well :)
http://stackoverflow.com/questions/7073789/how-best-to-dry-will-paginate-options

@mislav
Owner

Why would I want to display the text for :previous_label in place of the page gap?

I don't think you understand what's going on here. The i18n method you linked to is the preferred way to customize this.

@mislav mislav closed this
@keating

really sorry, my mistake. I just want to say,
text = (@options[:page_gap].nil?) ? (@template.will_paginate_translate(:page_gap) { '…' }) :@options[:page_gap]

'…' is 'Page gap' in my system, I don't know why : (

@mislav
Owner

See #171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 19, 2011
  1. @keating
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/will_paginate/view_helpers/link_renderer.rb
View
2  lib/will_paginate/view_helpers/link_renderer.rb
@@ -49,7 +49,7 @@ def page_number(page)
end
def gap
- text = @template.will_paginate_translate(:page_gap) { '…' }
+ text = (@options[:previous_label].nil?) ? (@template.will_paginate_translate(:page_gap) { '…' }) :@options[:previous_label]
%(<span class="gap">#{text}</span>)
end
Something went wrong with that request. Please try again.