added scope for index
This commit is contained in:
parent
09f4f9c072
commit
2a6f623f3c
|
@ -1,7 +1,7 @@
|
|||
class PersonalCertificatesController < ApplicationController
|
||||
def index
|
||||
params = OrbitHelper.params
|
||||
certificates = Certificate.where(:is_hidden=>false).order_by(:created_at=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
|
||||
certificates = Certificate.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?
|
||||
|
|
Loading…
Reference in New Issue