Add announcement model
This commit is contained in:
1 parent
62602940ed
commit
4807066c68
12 files changed
+182
-278
No files matched your search
@@ -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
@@ -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
|
||||
|
||||
Reference in new issue
Block a user