Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

name indexes

  • Loading branch information...
commit 0f9b99b03dc90dab45768e27613c6cf89f71e03b 1 parent ac2003e
@tmm1 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/mongo/collection.rb
View
2  lib/mongo/collection.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.