Fix bug
This commit is contained in:
parent
8f6bee5a8b
commit
690b219da0
|
@ -50,7 +50,7 @@ class GalleriesController < ApplicationController
|
|||
if albums_with_order.count == page_data_count
|
||||
albums_no_order = []
|
||||
else
|
||||
albums_no_order = album_tp.desc(:created_at).where(:order.in=>[-1,nil])[0...(page_data_count - albums_with_order.count)]
|
||||
albums_no_order = album_tp.desc(:created_at).where(:order.in=>[-1,nil]).page(nil).per(all_count)[0...(page_data_count - albums_with_order.count)]
|
||||
end
|
||||
else
|
||||
start_index = (page_data_count - (with_order_count % page_data_count) + page_data_count*(page_no - 1 - with_order_total_pages))
|
||||
|
|
Loading…
Reference in New Issue