From e181f0ed4d4206d21145174879ccc20ab2fff097 Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Mon, 18 Aug 2014 16:12:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B4=B4=E5=90=A7=E5=B8=96?= =?UTF-8?q?=E5=AD=90=E5=AD=98=E5=9C=A8=E6=80=A7=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_tag_name.html.erb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index a478cbe3b..38b8ac85c 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -70,14 +70,13 @@ :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> - <% when '5' %> - <% if Forum.find(obj.id) %> - <% if Forum.find(obj.id).creator_id == User.current.id %> + <% when '5' %> + <% test = Forum.find(obj.id) %> + <% if test && test.creator_id == User.current.id %> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> - <% end %> - <% end %> + <% end %> <% when '6' %> <%# if (User.current.logged? && User.current.admin?