This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/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