38 39 40
# File 'lib/mongomapper/support.rb', line 38 def self.from_mongo(value) !!value end
30 31 32 33 34 35 36
# File 'lib/mongomapper/support.rb', line 30 def self.to_mongo(value) if value.is_a?(Boolean) value else ['true', 't', '1'].include?(value.to_s.downcase) end end