orbit-basic/app/models/announcement.rb

13 lines
325 B
Ruby

class Announcement
include MongoMapper::Document
key :entry_name, String, :required => true, :index => true
key_i18n :title, String
key_i18n :content, String
def to_liquid
{ "entry_name" => self.entry_name, "id" => self.id.to_s, "title" => self.title, "content" => self.content }
end
end