Keep file formatation

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.

On Mar 2, 1:33pm, Diego B. [email protected] wrote:

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

 tags or
look at the simple_format helper (which turns line returns into
markup)

Fred

Thanks Fred, workerd with the

 tag.
I didnt know it existed :stuck_out_tongue:

Thanks again.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs