|
|
|
@ -294,7 +294,7 @@ class ContestsController < ApplicationController
|
|
|
|
|
softapplication = Softapplication.find(params[:contest])
|
|
|
|
|
contest_message = params[:contest_for_save][:contest_message]
|
|
|
|
|
if ContestingSoftapplication.where("softapplication_id = ? and contest_id = ?", softapplication.id, @contest.id).size == 0
|
|
|
|
|
if ContestingSoftapplication.create_contesting(@contest.id, softapplication.id, contest_message)
|
|
|
|
|
if ContestingSoftapplication.create_softapplication_contesting(@contest.id, softapplication.id, contest_message)
|
|
|
|
|
flash.now[:notice] = l(:label_bidding_contest_succeed)
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
@ -303,12 +303,11 @@ class ContestsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
@contesting_softapplication = @contest.contesting_softapplications
|
|
|
|
|
|
|
|
|
|
render :text => params.to_json
|
|
|
|
|
# respond_to do |format|
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
|
|
|
|
|
# format.html { redirect_to :back }
|
|
|
|
|
# format.js
|
|
|
|
|
# end
|
|
|
|
|
format.html { redirect_to :back }
|
|
|
|
|
format.js
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
## 新建留言
|
|
|
|
|
def create
|
|
|
|
|