search for: validates_whatever

Displaying 1 result from an estimated 1 matches for "validates_whatever".

2008 Feb 27
8
ActiveRecord validation messages not I18N-friendly and enforces grammar
...the grammar issue, thereby making validation messages at least a little more I18N-friendly. This solution is minimal and does not enforce any particular full-blown I18N solution on the developer, and should be backwards compatible. The proposal is as follows: If the :message argument is given to a validates_whatever, then check whether the :message string contains "%{fn}". If so, then the full validation error message should be formatted using the :message string, like this: full_message = message.sub(''%{fn}'', human_attribute_name) If no "%{fn}" is given, then it shoul...