Orbit/vendor/plugins/NewBlog/app/models/post.rb

8 lines
197 B
Ruby
Raw Normal View History

2011-11-18 08:43:14 +00:00
class Post
include Mongoid::Document
include Mongoid::Timestamps
field :title, :type => String
field :body, :type => String
embeds_many :comments
validates_presence_of :title, :body
end