diff --git a/app/models/course.rb b/app/models/course.rb index 32b192f2..5034ab0d 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -274,6 +274,7 @@ class Course < ActiveRecord::Base end end + #项目与课程分离后,很多课程的名称等信息为空,这些数据信息存储在项目表中!!就是数据兼容的问题 def name read_attribute('name') || Project.find_by_identifier(self.extra).try(:name) end diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index 1dc8bfee..a42844ff 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -43,7 +43,7 @@ @@ -71,7 +71,7 @@

<%= link_to "全部学校",school_index_path %>      - <%= link_to '我的学校',school_course_list_path(User.current.user_extensions.school) if User.current.logged? %> + 我的学校