Permalink
Browse files

name indexes

  • Loading branch information...
1 parent ac2003e commit 0f9b99b03dc90dab45768e27613c6cf89f71e03b @tmm1 committed Aug 25, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mongo/collection.rb
View
@@ -82,7 +82,7 @@ def remove obj
def index obj
obj = { obj => true } if obj.is_a? Symbol
- indexes.insert({ :name => 'num',
+ indexes.insert({ :name => obj.keys.map{|o| o.to_s }.sort.join('_'),
:ns => @ns,
:key => obj }, false)
end

0 comments on commit 0f9b99b

Please sign in to comment.