删除用户和拒绝用户可以再申请
This commit is contained in:
parent
f857ceab32
commit
5414080646
|
@ -103,7 +103,7 @@ class MembersController < ApplicationController
|
|||
# 发送消息给拒绝者
|
||||
AppliedMessage.create(:user_id => @applied_message.user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 5,
|
||||
:viewed => true, :applied_user_id => @applied_message.applied_user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||
# applied_project.delete
|
||||
applied_project.delete
|
||||
end
|
||||
|
||||
def create
|
||||
|
@ -370,6 +370,11 @@ class MembersController < ApplicationController
|
|||
grade.destroy
|
||||
end
|
||||
end
|
||||
# 移出的时候删除申请消息,不需要删除消息,所以不必要关联删除
|
||||
applied_projects = AppliedProject.where(:project_id => @project.id, :user_id => @member.user_id).first
|
||||
unless applied_projects.nil?
|
||||
applied_projects.delete
|
||||
end
|
||||
#移出项目发送消息
|
||||
ForgeMessage.create(:user_id => @member.user_id, :project_id => @project.id, :forge_message_type => "RemoveFromProject", :viewed => false, :forge_message_id => User.current.id)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue