Show More
Commit Description:
MERGE changeset 306:307 from branch ytopc08-2 that fixes migration bug...
Commit Description:
MERGE changeset 306:307 from branch ytopc08-2 that fixes migration bug git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@308 6386c4cd-e34a-4fa8-8920-d93eb39b512e
File last commit:
Show/Diff file:
Action:
app/models/announcement.rb | 15 lines | 425 B | text/x-ruby | RubyLexer |
class Announcement < ActiveRecord::Base
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
end