parent
7f4e00f991
commit
0d189e77e2
|
@ -29,11 +29,7 @@ class PersonalPatentsController < ApplicationController
|
||||||
else
|
else
|
||||||
patents_show = patents_temp.select { |value| search_all_words((value.send(params[:selectbox]).to_s rescue ''), params[:keywords]) }
|
patents_show = patents_temp.select { |value| search_all_words((value.send(params[:selectbox]).to_s rescue ''), 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
|
|
||||||
patents = patents_show[(page_to_show - 1) * page_data_count...page_to_show * page_data_count]
|
patents = patents_show[(page_to_show - 1) * page_data_count...page_to_show * page_data_count]
|
||||||
patents_total_pages = (patents_show.length / page_data_count.to_f).ceil
|
patents_total_pages = (patents_show.length / page_data_count.to_f).ceil
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue