# File lib/mongoid/indexes.rb, line 17 def create_indexes return unless index_options current_collection = self._collection || set_collection index_options.each_pair do |name, options| current_collection.create_index(name, options) end end