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