TextArea Parameter

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:

http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-text_area

Robert W. wrote in post #1142180:

The documentation contains your answer:

http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-text_area

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.

| Privacy Policy | Terms of Service | Remote Ruby Jobs