This commit is contained in:
z9hang 2014-05-27 20:03:28 +08:00
commit cd333c8f35
1 changed files with 8 additions and 2 deletions

View File

@ -76,7 +76,6 @@ class MembersController < ApplicationController
# ProjectInfo.create(:name => "test", :user_id => 123)
end
## end
AppliedProject.deleteappiled(user_id, @project.id)
end
else
members << Member.new(:role_ids => params[:membership][:role_ids], :user_id => params[:membership][:user_id])
@ -95,6 +94,13 @@ class MembersController < ApplicationController
end
end
if members.present? && members.all? {|m| m.valid? }
members.each do |member|
AppliedProject.deleteappiled(member.user_id, @project.id)
end
end
respond_to do |format|
format.html { redirect_to_settings_in_projects }
format.js { @members = members;@applied_members = applied_members; }