lib/mongoo/attribute_sanitizer.rb in mongoo-0.5.6 vs lib/mongoo/attribute_sanitizer.rb in mongoo-0.5.7

- old
+ new

@@ -1,13 +1,13 @@ module Mongoo - class InvalidAttributeValue < Exception; end - class AttributeSanitizer class << self def sanitize(field_type, val) return val if val.nil? || field_type.nil? case field_type.to_sym + when :* + val when :string then val.is_a?(String) ? val : val.to_s when :symbol then val.is_a?(Symbol) ? val : val.to_sym when :integer then \ No newline at end of file