Forum: Ruby on Rails text_area and :value

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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: http://dev.rubyonrails.org/ticket/3752 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")

or

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

-Adam
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>

not...

<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.