include GLoc\r
end\r
\r
- class Errors\r
- include GLoc\r
- alias :add_without_gloc :add\r
- # The GLoc version of this method provides two extra features\r
- # * If <tt>msg</tt> is a string, it will be considered a GLoc string key.\r
- # * If <tt>msg</tt> is an array, the first element will be considered\r
- # the string and the remaining elements will be considered arguments for the\r
- # string. Eg. <tt>['Hi %s.','John']</tt>\r
- def add(attribute, msg= @@default_error_messages[:invalid])\r
- if msg.is_a?(Array)\r
- args= msg.clone\r
- msg= args.shift\r
- args= nil if args.empty?\r
- end\r
- msg= ltry(msg)\r
- msg= msg % args unless args.nil?\r
- add_without_gloc(attribute, msg)\r
- end\r
- # Inherits the current language from the base record.\r
- def current_language\r
- @base.current_language\r
- end\r
- end\r
+# class Errors\r
+# include GLoc\r
+# alias :add_without_gloc :add\r
+# # The GLoc version of this method provides two extra features\r
+# # * If <tt>msg</tt> is a string, it will be considered a GLoc string key.\r
+# # * If <tt>msg</tt> is an array, the first element will be considered\r
+# # the string and the remaining elements will be considered arguments for the\r
+# # string. Eg. <tt>['Hi %s.','John']</tt>\r
+# def add(attribute, msg= @@default_error_messages[:invalid])\r
+# if msg.is_a?(Array)\r
+# args= msg.clone\r
+# msg= args.shift\r
+# args= nil if args.empty?\r
+# end\r
+# msg= ltry(msg)\r
+# msg= msg % args unless args.nil?\r
+# add_without_gloc(attribute, msg)\r
+# end\r
+# # Inherits the current language from the base record.\r
+# def current_language\r
+# @base.current_language\r
+# end\r
+# end\r
\r
module Validations #:nodoc:\r
module ClassMethods\r