Update personal_books_controller.rb

fix error
This commit is contained in:
chiu 2019-08-19 16:14:01 +08:00
parent 20d35e7162
commit 7c338ff4bc
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ class PersonalBooksController < ApplicationController
else
page_to_show = params[:page_no].to_i
end
books = books_show[(page_to_show-1)page_data_count...page_to_show*page_data_count]
books = books_show[(page_to_show-1)*page_data_count...page_to_show*page_data_count]
books_total_pages = (books_show.length/page_data_count.to_f).ceil
else
books_total_pages = books.total_pages