Sha256: 8c40408f0243694eaf9cd8994428cfa2759e43d4384878ce9b122f1f20d01ce5
Contents?: true
Size: 534 Bytes
Versions: 16
Compression:
Stored size: 534 Bytes
Contents
module Mongoid module Contexts module IdConversion protected # Convert ids from strings to +BSON::ObjectID+s def strings_to_object_ids(ids) if Array === ids ids.map {|id| string_to_object_id(id) } else string_to_object_id(ids) end end # Convert ids from strings to +BSON::ObjectID+s def string_to_object_id(id) if String === id ::BSON::ObjectID.from_string(id) else id end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems