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.

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 Fred, workerd with the <pre> tag.
I didnt know it existed :stuck_out_tongue:

Thanks again.