>
> 2. regardless of what they enter in the field (uppercase or lowercase)
> I need to convert the username value to uppercase before it's stored
>
Try this:
class Post < ActiveRecord::Base
def before_save
self.username.downcase!
end
end
Cheers,
Andy
--
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.