Wait, why do you have to do this? If you have a field in the db, you don't need ot do this, rails will automatically give you the option for a name=