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: <code> @data = `/usr/bin/ruby_script.rb` </code> View Code: <code> <%= @data %> </code> 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 -- 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.
Hassan Schroeder
2010-Feb-26 19:18 UTC
Re: Text Output Display in Rails is OUT OF CONTROL!
On Fri, Feb 26, 2010 at 9:50 AM, jackster the jackle <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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: > <code> > <%= @data %> > </code>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 Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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.
jackster the jackle
2010-Feb-26 20:29 UTC
Re: Text Output Display in Rails is OUT OF CONTROL!
"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 -- 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.
Hassan Schroeder
2010-Feb-26 21:27 UTC
Re: Re: Text Output Display in Rails is OUT OF CONTROL!
On Fri, Feb 26, 2010 at 12:29 PM, jackster the jackle <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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 Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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.
jackster the jackle
2010-Feb-26 22:54 UTC
Re: Re: Text Output Display in Rails is OUT OF CONTROL!
> 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 -- 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.
Hassan Schroeder
2010-Feb-27 00:11 UTC
Re: Re: Re: Text Output Display in Rails is OUT OF CONTROL!
On Fri, Feb 26, 2010 at 2:54 PM, jackster the jackle <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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 Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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.