Class: Float

Inherits:
Object show all
Defined in:
lib/mongo_mapper/extensions.rb

Class Method Summary collapse

Class Method Details

.to_mongo(value) ⇒ Object



64
65
66
# File 'lib/mongo_mapper/extensions.rb', line 64

def self.to_mongo(value)
  value.nil? ? nil : value.to_f
end