diff --git a/app/controllers/personal_patents_controller.rb b/app/controllers/personal_patents_controller.rb index 025468f..d58c112 100644 --- a/app/controllers/personal_patents_controller.rb +++ b/app/controllers/personal_patents_controller.rb @@ -1,7 +1,7 @@ class PersonalPatentsController < ApplicationController def index params = OrbitHelper.params - patents = Patent.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) + patents = Patent.where(:is_hidden=>false).sort_for_frontend.page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) fields_to_show = Page.where(:page_id => params[:page_id]).first.custom_array_field rescue [] if fields_to_show.blank? fields_to_show = [