Hello! I developed a management application for some internal applications the company i work. Mostly applications accept a file with some params and then export the result to a file, so the rails app generate the file input, execute, get the answer from the result file and show on screen. But in the result file, everything is formated, but when i show on screen, i get everything in the sameline =/ Anyone know any way to workarount this!? In the rails action im using File.open().read to get the content from file. Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 2, 1:33 pm, Diego Bernardes <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello! > > I developed a management application for some internal applications the > company i work. > Mostly applications accept a file with some params and then export the > result to a file, so the rails app generate the file input, execute, get > the answer from the result file and show on screen. > > But in the result file, everything is formated, but when i show on > screen, i get everything in the sameline =/ > > Anyone know any way to workarount this!? > In the rails action im using File.open().read to get the content from > file. >Are you just outputting the files contents in the middle of an html file? If so html ignores line returns, tabs so on. You might want to either wrap the relevant content in <pre> tags or look at the simple_format helper (which turns line returns into markup) Fred> Thanks. > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks Fred, workerd with the <pre> tag. I didnt know it existed :P Thanks again. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.