On Sat, Aug 22, 2015 at 8:25 AM, Walter Lee Davis wrote:

As Hassan said, puts is not going to get it for you here. But a newline will work as a line-break inside the content of a textarea. If you store the string containing the newlines, and you show it inside a textarea, it will preserve the newlines.
Gah, yes, my bad. Walter is correct - newlines are rendered as is
within the textarea. (I was thinking about outputting the result.)

I should know because I've used this before, i.e. to allow a user to
input a newline-separated set of response strings for a poll creation
tool. And it works fine :-)

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yC8CJkcy1yLj78LfChihvK3H-bLPrQ2xaFkeFAEQA2LHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedAug 19, '15 at 12:19p
activeSep 18, '15 at 12:05p
posts6
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase