create mongoDB indexes for locomotive models without any errors

This commit is contained in:
Didier Lafforgue 2012-03-13 16:37:19 +01:00
parent fad363a92a
commit 79f958c505
2 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@ module Locomotive
## indexes ##
index :position
index [:depth.asc, :position.asc]
index [[:depth, Mongo::ASCENDING], [:position, Mongo::ASCENDING]]
end
module ClassMethods

View File

@ -60,4 +60,5 @@ namespace :locomotive do
end
end
end