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
Jon Gretar Borgthorsson
2006-Apr-23 16:56 UTC
[Rails] Does AJAX form_remote_tag remove "\r\n"?
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:> 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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
I do not remember having specified :text vs. :string anywhere. Where would this configuration be? And how would it make any differences? Sharkie On Apr 23, 2006, at 11:56 PM, Jon Gretar Borgthorsson wrote:> 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: >> 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 >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > -- > -------------- > Jon Gretar Borgthorsson > http://www.jongretar.net/ > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
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-- Posted via http://www.ruby-forum.com/.