diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 6ce5e2095..541fa67ed 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -20,6 +20,8 @@ <% unless @activity.empty? %>
<% @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? %> diff --git a/app/views/users/watch_projects.html.erb b/app/views/users/watch_projects.html.erb index 137fc21fb..69c7e09da 100644 --- a/app/views/users/watch_projects.html.erb +++ b/app/views/users/watch_projects.html.erb @@ -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 %>
@@ -11,7 +11,7 @@
- +
<%= link_to_user(@user) if watch_project.respond_to?(:user) %> <%= @user.name%><%= l(:label_watch_project) %> <%= link_to_project(watch_project.project) %> <%= link_to_user(@user) if watch_project.respond_to?(:user) %> <%= link_to_project(watch_project.project) %>