parent
8a8fe31ec3
commit
7c58b3fee6
|
@ -48,11 +48,7 @@ class PersonalBooksController < ApplicationController
|
||||||
else
|
else
|
||||||
books_show = books_temp.select { |value| search_all_words(value.send(params[:selectbox]).to_s, params[:keywords]) }
|
books_show = books_temp.select { |value| search_all_words(value.send(params[:selectbox]).to_s, params[:keywords]) }
|
||||||
end
|
end
|
||||||
page_to_show = if params[:page_no].nil?
|
page_to_show = params[:page_no].nil? ? 1 : params[:page_no].to_i
|
||||||
1
|
|
||||||
else
|
|
||||||
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
|
books_total_pages = (books_show.length / page_data_count.to_f).ceil
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue