关注项目无法显示的问题

exceptionHandle
yanxd 12 years ago
parent 45c6c0b9f3
commit 64e68ff8a0

@ -20,6 +20,8 @@
<% unless @activity.empty? %> <% unless @activity.empty? %>
<div id="activity"> <div id="activity">
<% @activity.each do |e| %> <% @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 %> <% act = e.act %>
<% unless act.nil? %> <% 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;"> <table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">

@ -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) %> <%= 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 %> <% end %>
<%= watch_projects @state%> <%= watch_projects @state%>
<% if @watch_projects.nil?&&watch_projects.project.nil? %> <% if @watch_projects.count > 0 %>
<% for watch_project in @watch_projects %> <% 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;"> <table width="660" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
<tr> <tr>
@ -11,7 +11,7 @@
<td> <td>
<table width="580" border="0"> <table width="580" border="0">
<tr> <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>
<tr> <tr>
<td colspan="2" width="580" > <td colspan="2" width="580" >

Loading…
Cancel
Save