From feab7a152cabcf3547251ca0bbc2542567a212f9 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 8 Dec 2016 12:26:59 +0900 Subject: [PATCH] For clarity --- kaminari-core/lib/kaminari/helpers/paginator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kaminari-core/lib/kaminari/helpers/paginator.rb b/kaminari-core/lib/kaminari/helpers/paginator.rb index a349c93..4c8a71e 100644 --- a/kaminari-core/lib/kaminari/helpers/paginator.rb +++ b/kaminari-core/lib/kaminari/helpers/paginator.rb @@ -145,8 +145,8 @@ module Kaminari end def single_gap? - (@page == @options[:current_page] - @options[:window] - 1) && (@page == @options[:left] + 1) || - (@page == @options[:current_page] + @options[:window] + 1) && (@page == @options[:total_pages] - @options[:right]) + ((@page == @options[:current_page] - @options[:window] - 1) && (@page == @options[:left] + 1)) || + ((@page == @options[:current_page] + @options[:window] + 1) && (@page == @options[:total_pages] - @options[:right])) end def out_of_range?