# Text\_area value

**URL:** <https://www.ruby-forum.com/t/text-area-value/144339>\
**Category:** Rails\
**Created:** [July 28, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/text-area-value/144339 "2008-07-28T20:16:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdrietz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5f8ce5/32.png) [@jdrietz](https://www.ruby-forum.com/u/jdrietz)\
**Post date:** [July 28, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/text-area-value/144339/1 "2008-07-28T20:16:29Z")

</div>

Hey,

I have existing threads with two fields: title and text. When a user  
clicks “edit”, I say, in the new thread form:

\<% form.text\_area :text, :value =\> params[:text] %\>

params[:text] = the text in the thread which the user wants to edit.

It works fine most of the time, but if I made a new thread and had  
linebreaks, clicking edit fails.

New form:  
text:  
sdfjksdfj  
sdfjsdf  
sdfsdf

Those linebreaks are causing some trouble! Where is the problem? Is it  
storing the text/linebreaks in the params[:text] or in trying to set  
:value =\> params[:text]?

Thanks!
