lib/mongoid/collections.rb in mongoid-2.0.0.beta.20 vs lib/mongoid/collections.rb in mongoid-2.0.0.rc.1
- old
+ new
@@ -16,10 +16,9 @@
# document is embedded, there will be no collection associated
# with it.
#
# Returns: <tt>Mongo::Collection</tt>
def collection
- raise Errors::InvalidCollection.new(self) if embedded?
self._collection || set_collection
add_indexes; self._collection
end
# Return the database associated with this collection.