Given the following code:
form_tag .... text_area :val, params[:val] submit_tag... end
Is there a way to change to
text_area :xx
but keep :val as the parameter that is passed to the backend? That is, I want to change the id but the parameter name.
Given the following code:
form_tag .... text_area :val, params[:val] submit_tag... end
Is there a way to change to
text_area :xx
but keep :val as the parameter that is passed to the backend? That is, I want to change the id but the parameter name.
The documentation contains your answer:
Robert Walker wrote in post #1142180:
The documentation contains your answer:
In case you didn't get that here's an example:
<%= f.text_area :description, { id: "my_description" } %> => <textarea id="my_description" name="person[description]"></textarea>
If you wan't to override any of the defaults you can pass what you want in the "options" hash.