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 W. 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” } %>
=>
If you wan’t to override any of the defaults you can pass what you want
in the “options” hash.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs