]> git.openstreetmap.org Git - rails.git/blobdiff - app/validators/utf8_validator.rb
Switch to using the zeitwork autoloader
[rails.git] / app / validators / utf8_validator.rb
index 0c6b3f5949e9eec7ba719aa2096a3b49fff71606..dec6f4d968f2f993eb996e0b603bbf4877c995f6 100644 (file)
@@ -2,7 +2,7 @@
 # validation method to be included like any other validations methods
 # in the models definitions. this one checks that the named attribute
 # is a valid UTF-8 format string.
 # validation method to be included like any other validations methods
 # in the models definitions. this one checks that the named attribute
 # is a valid UTF-8 format string.
-class Utf8Validator < ActiveModel::EachValidator
+class UTF8Validator < ActiveModel::EachValidator
   def validate_each(record, attribute, value)
     record.errors.add(attribute, " is invalid UTF-8") unless UTF8.valid? value
   end
   def validate_each(record, attribute, value)
     record.errors.add(attribute, " is invalid UTF-8") unless UTF8.valid? value
   end