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

8 lines
197 B
Ruby
Raw Normal View History

2011-08-25 11:02:20 +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