Remove needless `to_i` calls

In PageProxy `@page` should be an Integer, so we should not call `to_i`
This commit is contained in:
yui-knk 2015-08-01 20:12:41 +09:00
parent 4b2121e750
commit 6274af1994
1 changed files with 2 additions and 2 deletions

View File

@ -166,8 +166,8 @@ module Kaminari
end
def single_gap?
(@page.to_i == @options[:current_page] - @options[:window] - 1) && (@page.to_i == @options[:left] + 1) ||
(@page.to_i == @options[:current_page] + @options[:window] + 1) && (@page.to_i == @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?