orbit-basic/app/models/announcement.rb

13 lines
263 B
Ruby

require 'couch_foo'
class Announcement < CouchFoo::Base
property :title, String
property :content, String
validates_presence_of :title
def to_liquid
{ "id" => self.id, "title" => self.title, "content" => self.content }
end
end