I have a shell command statement in my controller that runs a ruby
script and puts this text output into my instance variable which I call
in my view.
Controller Code:
@data = /usr/bin/ruby_script.rb
View Code:
<%= @data %>
The problem is when @data has long strings of data, the don’t wrap in my
view so they go off page in the browser.
How can I force long strings contained in @data to word wrap in the
browser?
I tried putting them in a table but that didn’t help.
Thanks
jackster
On Fri, Feb 26, 2010 at 9:50 AM, jackster the jackle
[email protected] wrote:
I have a shell command statement in my controller that runs a ruby
script and puts this text output into my instance variable which I call
in my view.
View Code:
<%= @data %>
So are you really using the CODE tag? Regardless,
The problem is when @data has long strings of data, the don’t wrap in my
view so they go off page in the browser.
http://www.w3.org/TR/CSS21/text.html#propdef-white-space
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
“So are you really using the CODE tag? Regardless,”
Thanks Hassan,
No I’m not using these tags, I used them for the purposes of the forum
(which didn’t help)…sorry about that confusion.
The link to that document looks like exactly what I need…it appears
that I need to do this in my CSS file?
thanks
jackster
On Fri, Feb 26, 2010 at 12:29 PM, jackster the jackle
[email protected] wrote:
No I’m not using these tags, I used them for the purposes of the forum
(which didn’t help)…sorry about that confusion.
NP. The typical browser default for CODE tags is preformatted
(white space is significant and retained exactly). Anyway,
The link to that document looks like exactly what I need…it appears
that I need to do this in my CSS file?
Yes, apply the appropriate white-space setting to the selector for the
container (div, p, whatever) holding that content.
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
On Fri, Feb 26, 2010 at 2:54 PM, jackster the jackle
[email protected] wrote:
Yes, apply the appropriate white-space setting to the selector for the
container (div, p, whatever) holding that content.
What about the fact that it’s in a table, should I put the div tags
outside that?
No, try applying the style directly to the container it’s in, so if
that’s a
TD of a table, use that.
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
Yes, apply the appropriate white-space setting to the selector for the
container (div, p, whatever) holding that content.
What about the fact that it’s in a table, should I put the div tags
outside that?
thanks for the help
jackster