app/pagination/controllers/main_controller.rb in volt-pagination-0.0.4 vs app/pagination/controllers/main_controller.rb in volt-pagination-0.0.5
- old
+ new
@@ -78,19 +78,19 @@
current_page == 1
end
def next_page_url
new_page = current_page + 1
- if new_page <= total_pages
+ if new_page > total_pages
return ''
end
return url_for_page(new_page)
end
def previous_page_url
new_page = current_page - 1
- if new_page >= 1
+ if new_page < 1
return ''
end
return url_for_page(new_page)
end