method
text_area
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(:post, :body, cols: 20, rows: 40) # => <textarea cols="20" rows="40" id="post_body" name="post[body]"> # #{@post.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