Ray's modifications

This commit is contained in:
chris2tof committed 2011-11-18 16:43:14 +08:00
1 parent 861237d65b
commit 65349796d0
105 files changed
+1663 -369

No files matched your search

View File
Whitespace-only changes.
+7
View File
@@ -0,0 +1,7 @@
class Comment
include Mongoid::Document
include Mongoid::Timestamps
field :name, :type => String
field :body, :type => String
embedded_in :post, :inverse_of => :comments
end
+8
View File
@@ -0,0 +1,8 @@
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