Forum: Ruby on Rails text_area and :value

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Todd S. (Guest)
on 2006-04-06 23:33
I'm trying to use the text_area() method and would like to populate the
text block with initial text.
According to this: there was a
fix put in place, but I'm ont sure how to integrate this.

How do I get the :value parameter to show up within the textbloc instead
of the html attributes?
Adam B. (Guest)
on 2006-04-06 23:46
Just a guess, but I think one of these will work:

text_area( <stuff> "value" => "YOUR TEXT HERE")


text_area( <stuff> :value => "YOUR TEXT HERE")

Todd S. (Guest)
on 2006-04-07 06:28
When I do this...

<%= text_area( "post", "textarea", :value => "YOUR TEXT HERE") %>

 I get...

<textarea cols="40" id="post_textarea" name="post[textarea]" rows="20"
value="YOUR TEXT HERE"></textarea>


<textarea cols="40" id="post_textarea" name="post[textarea]" rows="20" >
YOUR TEXT HERE </textarea>
This topic is locked and can not be replied to.