orbit-basic/app/models/announcement.rb

13 lines
333 B
Ruby

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