课程动态,无对应数据时报错
This commit is contained in:
parent
4b5022bfc6
commit
3e9f3f4e70
|
@ -682,6 +682,7 @@ module CoursesHelper
|
||||||
# activity = CourseActivity.first
|
# activity = CourseActivity.first
|
||||||
title = ""
|
title = ""
|
||||||
url = ""
|
url = ""
|
||||||
|
if activity.course_act
|
||||||
case activity.course_act_type
|
case activity.course_act_type
|
||||||
when "Course"
|
when "Course"
|
||||||
title = activity.course_act.name
|
title = activity.course_act.name
|
||||||
|
@ -705,6 +706,7 @@ module CoursesHelper
|
||||||
title = "问卷 " + activity.course_act.polls_name
|
title = "问卷 " + activity.course_act.polls_name
|
||||||
url = poll_index_path(:polls_type => "Course", :polls_group_id => activity.course_id)
|
url = poll_index_path(:polls_type => "Course", :polls_group_id => activity.course_id)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
link_to title.gsub(/<(?!img)[^>]*>/,'').html_safe, url, :class => "problem_tit c_dblue fl fb"
|
link_to title.gsub(/<(?!img)[^>]*>/,'').html_safe, url, :class => "problem_tit c_dblue fl fb"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue