Show More
Commit Description:
added codejom controller, show status in public
Commit Description:
added codejom controller, show status in public
References:
File last commit:
Show/Diff file:
Action:
app/models/user_contest_stat.rb
| 14 lines
| 300 B
| text/x-ruby
| RubyLexer
|
|
r217 | class UserContestStat < ActiveRecord::Base | ||
belongs_to :user | ||||
def self.update_user_start_time(user) | ||||
stat = user.contest_stat | ||||
if stat == nil | ||||
stat = UserContestStat.new(:user => user, | ||||
:started_at => Time.now.gmtime) | ||||
stat.save | ||||
end | ||||
end | ||||
end | ||||