Is there an easy way to make sure the username is titlecase before it gets saved in ruby….i was thinking a model method but not 100% sure
so if a user entered apple then i want it to be stored in the db as Apple
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yea i do think a before_save is a good option for this one.
I don’t know if you have seperated fields for the first/last and middle names, it would be easier then because the middle name should not be capitalized.
Here is an easy implementation: