I am trying to create a registration form (just for practice) and saw this method for rails and want to use it. However, I am quite confused on how I should use this. I have fields where each corresponds to an attribute in the database. Like I have
text_field_tag(:username) and my model has t.string :username. For password confirmation, I have the password attribute in the model, but I do not have the confirmation attribute. I am wondering how I should go about doing this so that Rails will check for the right field. What should I name the confirmation field?
is it just password_confirmation? Does this happen by convention? Can someone elaborate more about this function?
I am trying to create a registration form (just for practice) and saw this
Share
Yes _confirmation is a convention that can be overridden Add
To your model.