Skip to content

Commit

Permalink
Using predefined private object method total_pages instead of @collec…
Browse files Browse the repository at this point in the history
…tion.total_pages
  • Loading branch information
l-schirrmeister committed Jul 4, 2012
1 parent 71f793e commit e425862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/will_paginate/view_helpers/link_renderer.rb
Expand Up @@ -59,7 +59,7 @@ def previous_page
end end


def next_page def next_page
num = @collection.current_page < @collection.total_pages && @collection.current_page + 1 num = @collection.current_page < total_pages && @collection.current_page + 1
previous_or_next_page(num, @options[:next_label], 'next_page') previous_or_next_page(num, @options[:next_label], 'next_page')
end end


Expand Down

0 comments on commit e425862

Please sign in to comment.