Orbit/vendor/built_in_modules/announcement/app/models/announcement.rb

18 lines
396 B
Ruby
Raw Normal View History

2012-01-11 12:31:52 +00:00
# encoding: utf-8
class Announcement
include Mongoid::Document
include Mongoid::Timestamps
field :category, :type => String
field :title, :type => String
field :subtitle, :type => String
field :text, :type => String
field :postdate , :type => Date
field :deadline , :type => Date
# embeds_many :comments
validates_presence_of :category, :title, :subtitle, :text
end