修复贴吧标签有删除标识后删除失败的bug;

修复删除后没刷新的bug;
This commit is contained in:
chenmin 2014-08-15 14:07:13 +08:00
parent 05ed41615e
commit 19c5ebf450
1 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,8 @@ module TagsHelper
@obj = Issue.find_by_id(obj_id)
when '4'
@obj = Bid.find_by_id(obj_id)
when '5'
@obj = Forum.find_by_id(obj_id)
when '6'
@obj = Attachment.find_by_id(obj_id)
when '7'
@ -44,6 +46,8 @@ module TagsHelper
if user.id == obj_id
@result = true
end
when '5'
@result = is_forum_manager?(user.id,obj_id)
when '7'
if user.id == obj_id
@result = true
@ -56,6 +60,17 @@ module TagsHelper
end
# 判断用户是否是贴吧的管理员
# add by chenmin
def is_forum_manager?(user_id,forum_id)
@result = false
@user_id = Forum.find(forum_id).creator_id;
if @user_id == user.id
@result = true
end
return @result
end
def tagname_val
("#tag_name_name").value
end