now questions with blank title wont be shown

This commit is contained in:
harrybomrah committed 2016-05-12 16:14:06 +08:00
1 parent 3ee5ecd592
commit ee8ce22a18
1 file changed
+1 -1
+1 -1
View File
@@ -24,7 +24,7 @@ class Qa
accepts_nested_attributes_for :qa_files, :allow_destroy => true
accepts_nested_attributes_for :qa_links, :allow_destroy => true
scope :can_display, ->{where(:is_hidden=>false).order_by([:is_top, :desc])}
scope :can_display, ->{where(:is_hidden=>false,:title.ne => "").order_by([:is_top, :desc])}
# belongs_to :qa_category