Show More
Commit Description:
add model solution
Commit Description:
add model solution
References:
File last commit:
Show/Diff file:
Action:
app/models/announcement.rb | 15 lines | 416 B | text/x-ruby | RubyLexer |
jittat
[web] added announcement...
r97 class Announcement < ActiveRecord::Base
jittat
added announcement to frontpage...
r151
change find(:xxx) to correct syntax for rails 4
r619 def self.published(contest_started=false)
jittat
MERGED 308:HEAD from http://theory.cpe.ku.ac.th/grader/web/branches/ytopc08-2/, removed some registration info...
r162 if contest_started
change find(:xxx) to correct syntax for rails 4
r619 where(published: true).where(frontpage: false).order(created_at: :desc)
jittat
MERGED 308:HEAD from http://theory.cpe.ku.ac.th/grader/web/branches/ytopc08-2/, removed some registration info...
r162 else
change find(:xxx) to correct syntax for rails 4
r619 where(published: true).where(frontpage: false).where(contest_only: false).order(created_at: :desc)
jittat
MERGED 308:HEAD from http://theory.cpe.ku.ac.th/grader/web/branches/ytopc08-2/, removed some registration info...
r162 end
jittat
added announcement to frontpage...
r151 end
change find(:xxx) to correct syntax for rails 4
r619 def self.frontpage
where(published: 1).where(frontpage: 1).order(created_at: :desc)
jittat
added announcement to frontpage...
r151 end
jittat
[web] added announcement...
r97 end