added scope for index

This commit is contained in:
Harry Bomrah 2016-04-11 19:22:07 +08:00
parent 26abf163fa
commit b104346502
1 changed files with 1 additions and 1 deletions

View File

@ -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 []