Sha256: fe49e4941e47f7dc291f88ca221b563982f166f4de52094207e04f5fcf65261c

Contents?: true

Size: 224 Bytes

Versions: 18

Compression:

Stored size: 224 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Extensions
    module Float
      def to_mongo(value)
        value.blank? ? nil : value.to_f
      end
    end
  end
end

class Float
  extend MongoMapper::Extensions::Float
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
mongo_mapper-0.15.3 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.15.2 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.15.1 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.15.0 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.14.0 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.14.0.rc1 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.13.1 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.13.0 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.13.0.beta2 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.13.0.beta1 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.12.0 lib/mongo_mapper/extensions/float.rb
lookout-mongo_mapper-0.11.3 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.11.2 lib/mongo_mapper/extensions/float.rb
jamieorc-mongo_mapper-0.11.1.1 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.11.1 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.11.0 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.10.1 lib/mongo_mapper/extensions/float.rb
mongo_mapper-0.10.0 lib/mongo_mapper/extensions/float.rb