Skip to content
Browse files

Using predefined private object method total_pages instead of @collec…

…tion.total_pages
  • Loading branch information...
1 parent 71f793e commit e425862f17b1e59141e52110a4b3d2600c07f835 @l-schirrmeister committed Jul 4, 2012
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
@@ -59,7 +59,7 @@ def previous_page
end
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')
end

0 comments on commit e425862

Please sign in to comment.
Something went wrong with that request. Please try again.