Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
cd333c8f35
|
@ -76,8 +76,7 @@ class MembersController < ApplicationController
|
||||||
# ProjectInfo.create(:name => "test", :user_id => 123)
|
# ProjectInfo.create(:name => "test", :user_id => 123)
|
||||||
end
|
end
|
||||||
## end
|
## end
|
||||||
AppliedProject.deleteappiled(user_id, @project.id)
|
end
|
||||||
end
|
|
||||||
else
|
else
|
||||||
members << Member.new(:role_ids => params[:membership][:role_ids], :user_id => params[:membership][:user_id])
|
members << Member.new(:role_ids => params[:membership][:role_ids], :user_id => params[:membership][:user_id])
|
||||||
user_grades << UserGrade.new(:user_id => params[:membership][:user_id], :project_id => @project.id)
|
user_grades << UserGrade.new(:user_id => params[:membership][:user_id], :project_id => @project.id)
|
||||||
|
@ -95,6 +94,13 @@ class MembersController < ApplicationController
|
||||||
end
|
end
|
||||||
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|
|
respond_to do |format|
|
||||||
format.html { redirect_to_settings_in_projects }
|
format.html { redirect_to_settings_in_projects }
|
||||||
format.js { @members = members;@applied_members = applied_members; }
|
format.js { @members = members;@applied_members = applied_members; }
|
||||||
|
|
Loading…
Reference in New Issue