forked from saurabh/personal-project
parent
f15e08fc32
commit
2780fbf646
|
@ -29,11 +29,7 @@ class PersonalProjectsController < ApplicationController
|
||||||
else
|
else
|
||||||
projects_show = projects_temp.select { |value| search_all_words(value.send(params[:selectbox]).to_s, params[:keywords]) }
|
projects_show = projects_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
|
|
||||||
projects = projects_show[(page_to_show - 1) * page_data_count...page_to_show * page_data_count]
|
projects = projects_show[(page_to_show - 1) * page_data_count...page_to_show * page_data_count]
|
||||||
projects_total_pages = (projects_show.length / page_data_count.to_f).ceil
|
projects_total_pages = (projects_show.length / page_data_count.to_f).ceil
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue