Module: MongoMapper::Extensions::Float

Included in:
Float
Defined in:
lib/mongo_mapper/extensions/float.rb

Instance Method Summary collapse

Instance Method Details

#to_mongo(value) ⇒ Object



5
6
7
# File 'lib/mongo_mapper/extensions/float.rb', line 5

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