Sha256: 3c3311ca93cb375b80b655d53fc9d2881764457d5c4d088c3ee02e4430006020

Contents?: true

Size: 302 Bytes

Versions: 71

Compression:

Stored size: 302 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Extensions
    module String
      def to_mongo(value)
        value.nil? ? nil : value.to_s
      end

      def from_mongo(value)
        value.nil? ? nil : value.to_s
      end
    end
  end
end

class String
  extend MongoMapper::Extensions::String
end

Version data entries

71 entries across 71 versions & 9 rubygems

Version Path
mongo_mapper-0.12.0 lib/mongo_mapper/extensions/string.rb
lookout-mongo_mapper-0.11.3 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.11.2 lib/mongo_mapper/extensions/string.rb
jamieorc-mongo_mapper-0.11.1.1 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.11.1 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.11.0 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.10.1 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.10.0 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.9.2 lib/mongo_mapper/extensions/string.rb
jonbell-mongo_mapper-0.8.6 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.9.1 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.9.0 lib/mongo_mapper/extensions/string.rb
ign-mongo_mapper-0.8.6.2 lib/mongo_mapper/extensions/string.rb
ign-mongo_mapper-0.8.6.1 lib/mongo_mapper/extensions/string.rb
ssherman-mongo_mapper-0.8.6 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.8.6 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.8.5 lib/mongo_mapper/extensions/string.rb
honkster-mongo_mapper-0.8.4 lib/mongo_mapper/extensions/string.rb
mongo_mapper-0.8.4 lib/mongo_mapper/extensions/string.rb
mongo_mapper-unstable-2010.08.19 lib/mongo_mapper/extensions/string.rb