orbit-basic/app/models/announcement.rb

12 lines
225 B
Ruby

class Announcement
include MongoMapper::Document
key_i18n :title, String
key_i18n :content, String
def to_liquid
{ "id" => self.id, "title" => self.title, "content" => self.content }
end
end