Orbit/vendor/built_in_modules/NewBlog/app/models/comment.rb

7 lines
183 B
Ruby

class Comment
include Mongoid::Document
include Mongoid::Timestamps
field :name, :type => String
field :body, :type => String
embedded_in :post, :inverse_of => :comments
end