method
text_area
v7.2.3 -
Show latest stable
-
1 note -
Class: ActionView::Helpers::FormHelper
- 1.0.0 (0)
- 1.1.6 (0)
- 1.2.6 (0)
- 2.0.3 (24)
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (-2)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (-1)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (0)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- 7.2.3 (0)
- 8.0.0 (-38)
- 8.1.1 (0)
- What's this?
text_area(object_name, method, options = {})
public
Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options.
Examples
text_area(:article, :body, cols: 20, rows: 40) # => <textarea cols="20" rows="40" id="article_body" name="article[body]"> # #{@article.body} # </textarea> text_area(:comment, :text, size: "20x30") # => <textarea cols="20" rows="30" id="comment_text" name="comment[text]"> # #{@comment.text} # </textarea> text_area(:application, :notes, cols: 40, rows: 15, class: 'app_input') # => <textarea cols="40" rows="15" id="application_notes" name="application[notes]" class="app_input"> # #{@application.notes} # </textarea> text_area(:entry, :body, size: "20x20", disabled: 'disabled') # => <textarea cols="20" rows="20" id="entry_body" name="entry[body]" disabled="disabled"> # #{@entry.body} # </textarea>
Register or
log in
to add new notes.
hmayer00 -
March 17, 2015 - (v2.1.0 - v3.2.13)
0 thanks
defaults to 40 columns, 20 rows
as you can see in InstanceTag

