添加贴吧帖子存在性判断

This commit is contained in:
chenmin 2014-08-18 16:12:22 +08:00
parent 4ed9b13f0b
commit e181f0ed4d
1 changed files with 4 additions and 5 deletions

View File

@ -70,14 +70,13 @@
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% 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 %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% end %>
<% end %>
<% when '6' %>
<%# if (User.current.logged? &&
User.current.admin?