添加部分方法的注释

This commit is contained in:
sw 2015-03-24 09:28:35 +08:00
parent 584dcabeaa
commit 0496c33378
1 changed files with 4 additions and 11 deletions

View File

@ -181,6 +181,7 @@ class BidsController < ApplicationController
end
end
#将某个企业外包需求选为作业,目前此功能已放弃
def create_fork
@homework = Bid.new
@homework.name = params[:bid][:name]
@ -215,6 +216,7 @@ class BidsController < ApplicationController
end
end
#有两个路由链接到此方法:/bids/:id /calls/:id但是貌似这两个路由都不能访问。。方法作用有待确认
def show
@user = @bid.author
@jours = @bid.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
@ -250,40 +252,31 @@ class BidsController < ApplicationController
else
@state = 1
end
respond_to do |format|
# format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
# TO_DO
format.js { render :partial => 'set_join', :locals => {:user => User.current, :object_id => params[:id]} }
end
end
def unjoin_in_contest
joined = JoinInContest.where('bid_id = ? and user_id = ?', @bid.id, User.current.id)
joined.each do |join|
join.delete
end
respond_to do |format|
# format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_join', :locals => {:user => User.current, :object_id => params[:id]} }
end
end
def new_join
# added by fq
end
# added by bai 增加了参与者和竞赛设置
def show_participator
render :layout => 'base_contest'
end
#配置竞赛
def settings
if @bid.author.id == User.current.id
if @bid.reward_type == 2
@ -296,7 +289,7 @@ class BidsController < ApplicationController
end
#end
# 显示课程
# 显示课程作业,但是好像已经废弃
def show_course
bids = Bid.where('parent_id = ?', @bid.id)
@courses = []