now questions with blank title wont be shown

This commit is contained in:
Harry Bomrah 2016-05-12 16:14:06 +08:00
parent 3ee5ecd592
commit ee8ce22a18
1 changed files with 1 additions and 1 deletions

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