Sha256: 63537a27790868209e7f04df9f8468119be140df649fb4850581e85d5db353fc

Contents?: true

Size: 404 Bytes

Versions: 10

Compression:

Stored size: 404 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Extensions
    module Object
      extend ActiveSupport::Concern

      module ClassMethods
        def to_mongo(value)
          value
        end

        def from_mongo(value)
          value
        end
      end

      def to_mongo
        self.class.to_mongo(self)
      end
    end
  end
end

class Object
  include MongoMapper::Extensions::Object
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
mongo_mapper-0.13.1 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.13.0 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.13.0.beta2 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.13.0.beta1 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.12.0 lib/mongo_mapper/extensions/object.rb
lookout-mongo_mapper-0.11.3 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.11.2 lib/mongo_mapper/extensions/object.rb
jamieorc-mongo_mapper-0.11.1.1 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.11.1 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.11.0 lib/mongo_mapper/extensions/object.rb