From b104346502137fad10283223981b38947e38be63 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 11 Apr 2016 19:22:07 +0800 Subject: [PATCH] added scope for index --- app/controllers/personal_conferences_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_conferences_controller.rb b/app/controllers/personal_conferences_controller.rb index fa1eb83..5bd6600 100644 --- a/app/controllers/personal_conferences_controller.rb +++ b/app/controllers/personal_conferences_controller.rb @@ -1,7 +1,7 @@ class PersonalConferencesController < ApplicationController def index params = OrbitHelper.params - writing_conferences = WritingConference.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) + writing_conferences = WritingConference.where(:is_hidden=>false).sort_for_frontend.page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) page = Page.where(:page_id => params[:page_id]).first rescue nil if page.custom_string_field == "table" fields_to_show = page.custom_array_field rescue []