Forum: Ruby on Rails Does AJAX form_remote_tag remove "\r\n"?

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.
Bf1e5a140a444bdc5011185bba3a1ed3?d=identicon&s=25 Shark Fin Soup (Guest)
on 2006-04-23 18:41
(Received via mailing list)
When I submit textarea with "\r\n" inside its content, all the "\r\n"
are gone at the receiving end? Is there a known behavior I should be
aware off? Or should I start looking some where else.

Thank you,

Sharkie
30ee518e6fdc5b07e060775b5a542bdb?d=identicon&s=25 Jón Borgþórsson (jongretar)
on 2006-04-23 18:57
(Received via mailing list)
Doesn't for me.... You are using :text instead of :string on the
database end, right?

On 4/23/06, Shark Fin Soup <shark.fin.soup@mac.com> wrote:
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Bf1e5a140a444bdc5011185bba3a1ed3?d=identicon&s=25 Shark Fin Soup (Guest)
on 2006-04-23 19:09
(Received via mailing list)
I do not remember having specified :text vs. :string anywhere. Where
would this configuration be? And how would it make any differences?

Sharkie
D0cd6b10e01bacb976b3b815a9c660bc?d=identicon&s=25 Alex Wayne (Guest)
on 2006-04-23 21:12
Jón means in your database schema.  Your column you are stroing the text
area in should be TEXT, and not VARCHAR(255) (or :text instead of
:string using ruby table definitions in migrations)

Also, are you sure they are really gone?  When you redisplay the data
use:
<%= simple_format @my_model.message %>

That will make any line breaks obvious via <p></p> and <br /> tags.


Shark Fin Soup wrote:
> I do not remember having specified :text vs. :string anywhere. Where
> would this configuration be? And how would it make any differences?
>
> Sharkie
This topic is locked and can not be replied to.