From 09f4f9c07249d8f0c8f30ceb0c1290dd4b991a5e Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 11 Apr 2016 18:07:48 +0800 Subject: [PATCH] changed title for sorting --- app/models/certificate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/certificate.rb b/app/models/certificate.rb index ab8d6da..352a9df 100644 --- a/app/models/certificate.rb +++ b/app/models/certificate.rb @@ -9,7 +9,7 @@ class Certificate field :title, as: :slug_title, type: String, localize: true belongs_to :member_profile - scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:created_at =>'desc') } + scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:title =>'asc') } def self.get_plugin_datas_to_member(datas) page = Page.where(:module => "personal_certificate").first rescue nil