2009-06-01 06:20:15 +00:00
|
|
|
require 'couch_foo'
|
2009-06-01 02:54:16 +00:00
|
|
|
class Announcement < CouchFoo::Base
|
|
|
|
|
|
|
|
property :title, String
|
|
|
|
property :content, String
|
|
|
|
|
|
|
|
validates_presence_of :title
|
|
|
|
|
|
|
|
def to_liquid
|
2009-06-01 06:20:15 +00:00
|
|
|
{ "id" => self.id, "title" => self.title, "content" => self.content }
|
2009-06-01 02:54:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|