lib/saasable/mongoid/scoped_document.rb in saasable-0.2.2 vs lib/saasable/mongoid/scoped_document.rb in saasable-0.3.0
- old
+ new
@@ -5,9 +5,12 @@
@scoped_documents << klass unless @scoped_documents.include? klass
klass.extend ClassMethods
klass.class_eval do
field :saas_id, :type => BSON::ObjectId
+
+ index :saas_id
+ index [[:saad_id, 1], [:_id, 1]]
end
end
def self.scoped_documents
@scoped_documents