Show More
Commit Description:
more work on registration...
Commit Description:
more work on registration
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@296 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
app/models/announcement.rb
| 15 lines
| 425 B
| text/x-ruby
| RubyLexer
|
|
r97 | class Announcement < ActiveRecord::Base | ||
|
r151 | |||
def self.find_published | ||||
Announcement.find(:all, | ||||
:conditions => "(published = 1) AND (frontpage = 0)", | ||||
:order => "created_at DESC") | ||||
end | ||||
def self.find_for_frontpage | ||||
Announcement.find(:all, | ||||
:conditions => "(published = 1) AND (frontpage = 1)", | ||||
:order => "created_at DESC") | ||||
end | ||||
|
r97 | end | ||