Sha256: 86d42b90bd6722ff2cdb6648e831b09a4d5f9063c8b3223a44777384d6e21cd9

Contents?: true

Size: 234 Bytes

Versions: 75

Compression:

Stored size: 234 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Extensions
    module Hash
      def from_mongo(value)
        HashWithIndifferentAccess.new(value || {})
      end
    end
  end
end

class Hash
  extend MongoMapper::Extensions::Hash
end

Version data entries

75 entries across 75 versions & 9 rubygems

Version Path
mongo_mapper-0.13.1 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.13.0 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.13.0.beta2 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.13.0.beta1 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.12.0 lib/mongo_mapper/extensions/hash.rb
lookout-mongo_mapper-0.11.3 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.11.2 lib/mongo_mapper/extensions/hash.rb
jamieorc-mongo_mapper-0.11.1.1 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.11.1 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.11.0 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.10.1 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.10.0 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.9.2 lib/mongo_mapper/extensions/hash.rb
jonbell-mongo_mapper-0.8.6 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.9.1 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.9.0 lib/mongo_mapper/extensions/hash.rb
ign-mongo_mapper-0.8.6.2 lib/mongo_mapper/extensions/hash.rb
ign-mongo_mapper-0.8.6.1 lib/mongo_mapper/extensions/hash.rb
ssherman-mongo_mapper-0.8.6 lib/mongo_mapper/extensions/hash.rb
mongo_mapper-0.8.6 lib/mongo_mapper/extensions/hash.rb