Sha256: 9a2bc6ccc1756468738b0606882e2fe3dbc62ce886d10be74cc56d4c2433ec4d
Contents?: true
Size: 366 Bytes
Versions: 71
Compression:
Stored size: 366 Bytes
Contents
# encoding: UTF-8 module MongoMapper module Extensions module Integer def to_mongo(value) value_to_i = value.to_i if value_to_i == 0 && value != value_to_i value.to_s =~ /^(0x|0b)?0+/ ? 0 : nil else value_to_i end end end end end class Integer extend MongoMapper::Extensions::Integer end
Version data entries
71 entries across 71 versions & 9 rubygems