From b492ead0c0b7e39c52c5c75981002ac58c82e320 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 4 Jul 2014 11:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E6=A0=A1=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course.rb | 1 + app/views/school/index.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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? %> + 我的学校