Class: String

Inherits:
Object show all
Defined in:
lib/mongo_mapper/support.rb

Class Method Summary collapse

Class Method Details

.from_mongo(value) ⇒ Object



128
129
130
# File 'lib/mongo_mapper/support.rb', line 128

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

.to_mongo(value) ⇒ Object



124
125
126
# File 'lib/mongo_mapper/support.rb', line 124

def self.to_mongo(value)
  value.nil? ? nil : value.to_s
end