Ray's modifications
This commit is contained in:
1 parent
861237d65b
commit
65349796d0
105 files changed
+1663
-369
No files matched your search
Whitespace-only changes.
@@ -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
@@ -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
|
||||
Reference in new issue
Block a user