did you mean:

self.username.upcase ?? .... I need to make sure the username is
uppercase, not lowercase.

Thanks so much for the quick reply!


On Mar 5, 11:05 am, Andy Jeffries <[email protected]> wrote:
> > 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.

Reply via email to