spec/models.rb in yeastymobs-remarkable_mongomapper-0.0.1 vs spec/models.rb in yeastymobs-remarkable_mongomapper-0.1.0
- old
+ new
@@ -1,6 +1,42 @@
class Article
include MongoMapper::Document
key :title, String, :required => true
key :body, String
+
+ many :comments
+ many :unknowns
+ many :ratings, :class_name => "Rate"
+ many :assets
+ belongs_to :user
+ belongs_to :unknown
+ belongs_to :site, :class_name => 'Site'
+end
+
+class Comment
+ include MongoMapper::EmbeddedDocument
+
+ key :body, String
+end
+
+class User
+ include MongoMapper::Document
+
+ key :login, String
+end
+
+class Rate
+ include MongoMapper::EmbeddedDocument
+end
+
+class Rating
+ include MongoMapper::EmbeddedDocument
+end
+
+class Site
+ include MongoMapper::EmbeddedDocument
+end
+
+class Webiste
+ include MongoMapper::EmbeddedDocument
end
\ No newline at end of file