|
|
@ -24,7 +24,7 @@ module CoursesHelper
|
|
|
|
def find_excelletn_course keywords, current_course
|
|
|
|
def find_excelletn_course keywords, current_course
|
|
|
|
# 获取tag匹配结果ID
|
|
|
|
# 获取tag匹配结果ID
|
|
|
|
a_tags = []
|
|
|
|
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)}
|
|
|
|
if ec.tags.any?{|value| current_course.name.include?(value.to_s)}
|
|
|
|
a_tags << ec.id
|
|
|
|
a_tags << ec.id
|
|
|
|
end
|
|
|
|
end
|
|
|
|