FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Ruby on Rails aliasing db fields

 


Kelcey
hey everyone...

I'm doing some work with Ruby on Rails. I have a very simple question. So, with a model, we can do:

validates_presence_of :firstName

assuming firstName is in the db. So if the user doesn't enter a firstName, then it'll say something like

firstName can't be blank

when you display the errors. Well, I don't want the user to see "firstName." I want the user to see "First Name." Does anyone know how I can replace the name of the actual field with whatever I want?


Thanks!
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.