alan_develop v20160325_02
huang 9 years ago
parent 09fc2589a9
commit 8f0038c3ff

@ -24,7 +24,7 @@ module CoursesHelper
def find_excelletn_course keywords, current_course
# 获取tag匹配结果ID
a_tags = []
Course.where("is_excellent =? and is_public =?", 1, 1).includes(:tags).each do |ec|
Course.where("is_excellent =? and is_public =?", 1, 1).each do |ec|
if ec.tags.any?{|value| current_course.name.include?(value.to_s)}
a_tags << ec.id
end

Loading…
Cancel
Save