I have never had this problem in any previous projects, but for some reason all text_area inputs that contain a new line result in a huge indent ex -------------------------------- |Hello |World | | | -------------------------------- results in when editting -------------------------------- |Hello | World | | | -------------------------------- I have stripped out all text formatting on record saves, as well as formating when filling the text box. Has anyone seen this before? 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Iso, If you''re generating the text_area contents from rails you may want to try suppressing the new line when closing your ERb phrases like this: <%= Time.now -%> instead of <%= Time.now %> Just an idea. Arshak iso .. wrote:> I have never had this problem in any previous projects, but for some > reason all text_area inputs that contain a new line result in a huge > indent > > ex > -------------------------------- > |Hello > |World > | > | > | > -------------------------------- > > results in when editting > -------------------------------- > |Hello > | World > | > | > | > -------------------------------- > > I have stripped out all text formatting on record saves, as well as > formating when filling the text box. > > Has anyone seen this before? > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you aren''t using haml, ignore this. If you are using haml, this can happen due to how haml formats its ouput. To fix this in haml, tweak to your haml statement in the view to use the tilde instead of an equals when defining text areas, like the proj_text field below: %hr/ - form_for @project do |f| %table %tr %td= Project: %td= f.text_field :proj_name, :size => 30 %tr %td Description: %td= f.text_field :proj_desc, :size => 120 %tr %td Notes: %td~ f.text_area :proj_text, :cols => 90, :rows => 20 %hr/ %table %tr %td= f.submit "Save" -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ar Chron wrote:> If you aren''t using haml, ignore this. > > If you are using haml, this can happen due to how haml formats its > ouput. > > To fix this in haml, tweak to your haml statement in the view to use the > tilde instead of an equals when defining text areas, like the proj_text > field below: > > %hr/ > - form_for @project do |f| > %table > %tr > %td= Project: > %td= f.text_field :proj_name, :size => 30 > %tr > %td Description: > %td= f.text_field :proj_desc, :size => 120 > %tr > %td Notes: > %td~ f.text_area :proj_text, :cols => 90, :rows => 20 > %hr/ > %table > %tr > %td= f.submit "Save"I should have mentioned that I am using Haml this time around. That fixed the problem. Thank you very much. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---