Add announcement model

This commit is contained in:
Wen-Tien Chang committed 2009-06-01 10:54:16 +08:00
1 parent 62602940ed
commit 4807066c68
12 files changed
+182 -278

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
class Announcement < CouchFoo::Base
property :title, String
property :content, String
validates_presence_of :title
def self.load
# hmm.... but one module will has many pages
end
def to_liquid
{ :title => self.title, :content => self.content }
end
end
+1 -1
View File
@@ -5,7 +5,7 @@ class Page < CouchFoo::Base
property :content, String
property :layout_id, String
property :layout_name, String
property :load_model, String
property :use_engine, String
property :external_link, String
property :position, Integer
property :is_published, Boolean