2011-11-18 08:43:14 +00:00
|
|
|
class Post
|
|
|
|
include Mongoid::Document
|
|
|
|
include Mongoid::Timestamps
|
2012-02-09 09:48:51 +00:00
|
|
|
include OrbitCoreLib::ObjectAuthable
|
|
|
|
|
2011-11-18 08:43:14 +00:00
|
|
|
field :title, :type => String
|
|
|
|
field :body, :type => String
|
|
|
|
embeds_many :comments
|
|
|
|
validates_presence_of :title, :body
|
|
|
|
end
|