Generating the input id with an ActiveRecord model
- by swilliams
How do you generate an input's id attribute, given a model? For example, if I have a model of Person with a first_name attribute, the form helper prints out a textbox with this html:
<input type="text" id="person_first_name" />
How can I generate that person_first_name from some other place in the code (like in a controller or some place)?