关注项目无法显示的问题

This commit is contained in:
yanxd 2014-04-04 15:58:25 +08:00
parent 45c6c0b9f3
commit 64e68ff8a0
2 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,8 @@
<% unless @activity.empty? %>
<div id="activity">
<% @activity.each do |e| %>
<%# 以下一行代码解决有未知的活动无法转换成Model报错%>
<% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next; ) if e.act_type.safe_constantize.nil? %>
<% act = e.act %>
<% unless act.nil? %>
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">

View File

@ -3,7 +3,7 @@
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
<% end %>
<%= watch_projects @state%>
<% if @watch_projects.nil?&&watch_projects.project.nil? %>
<% if @watch_projects.count > 0 %>
<% for watch_project in @watch_projects %>
<table width="660" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
<tr>
@ -11,7 +11,7 @@
<td>
<table width="580" border="0">
<tr>
<td colspan="2" valign="top"><strong> <%= link_to_user(@user) if watch_project.respond_to?(:user) %></strong><span class="font_lighter"> <%= @user.name%><%= l(:label_watch_project) %></span> <%= link_to_project(watch_project.project) %></td>
<td colspan="2" valign="top"><strong> <%= link_to_user(@user) if watch_project.respond_to?(:user) %></strong><span class="font_lighter"> <%= link_to_project(watch_project.project) %></td>
</tr>
<tr>
<td colspan="2" width="580" >