Search code examples
ruby-on-railsrubyform-helpers

What is the equivalent of HTML'S input tag in Rails?


I want to be able to generate this

<input id="address" type="textarea" value="Write your Address here.">

Using some ruby form helpers.

Any hints ?


Solution

  • I assume you meant textarea since there is no such thing as textbox.

    http://apidock.com/rails/ActionView/Helpers/FormTagHelper/text_area_tag

    if it's not tied to a field in your model

    http://apidock.com/rails/ActionView/Helpers/FormHelper/text_area

    if it is.