spec/models.rb in remarkable_mongo-0.1.2 vs spec/models.rb in remarkable_mongo-0.1.3
- old
+ new
@@ -1,29 +1,30 @@
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
@@ -37,6 +38,14 @@
include MongoMapper::Document
end
class Webiste
include MongoMapper::EmbeddedDocument
-end
\ No newline at end of file
+end
+
+class Unknown
+ include MongoMapper::Document
+end
+
+class Asset
+ include MongoMapper::Document
+end