On Sat, Feb 20, 2010 at 4:35 AM, Aldo Italo <[email protected]> wrote: > hi, i created a validation to prevent users to write text uppercase in > my fields, i have writing the code on my class model like this:
> #prevent users to write text uppercase, and reset field text to lowercase Do you really need to "prevent" them, or can you just downcase it and be done? In any case, wouldn't the easiest check be something like unless ( field.downcase == field ) errors.add( ... ) ? -- Hassan Schroeder ------------------------ [email protected] twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

