修改重复加入项目提示语

This commit is contained in:
sw 2015-01-26 15:41:10 +08:00
parent 9f6ff04e65
commit d135274281
2 changed files with 5 additions and 1 deletions

View File

@ -10,8 +10,10 @@ class AppliedProjectController < ApplicationController
if @applieds.count == 0
appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])
Mailer.applied_project(appliedproject).deliver
@status = 2
else
@status = 1
end
@status = 1
else
@status = 0
end

View File

@ -1,6 +1,8 @@
<% if @status == 0%>
alert("您申请的项目不存在");
<% elsif @status == 1%>
alert("请勿重复申请加入该项目");
<% elsif @status == 2%>
alert("申请成功");
<%else%>
alert("申请失败");