I''ve been struggling with this for a while now and I give up. I searched and searched but couldn''t find the answer either. My edit form has a text area with the following HTML <p><b>Description</b><br> <textarea cols="40" id="workout_description" name="workout[description]" rows="5" wrap="virtual"> <%=@workout.description%></textarea> </p> Whenever the page loads, 10 extra blank spaces are in the text box before the description. The spaces are not in the database. If I don''t remove them before saving, the blanks get saved to the database. Any ideas on why this is happening? I changed the code to an input field and the problem goes away. Thanks, jankers --~--~---------~--~----~------------~-------~--~----~ 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 i look at your html code it looks like there are ten spaces after the start textarea tag and the <%=..... Rasmus --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 09/01/07, jankers <mikejancola-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> <p><b>Description</b><br> > <textarea cols="40" id="workout_description" > name="workout[description]" rows="5" wrap="virtual"> > <%=@workout.description%></textarea> </p> > > Whenever the page loads, 10 extra blank spaces are in the text box > before the description. The spaces are not in the database.Change it to: <textarea cols="40" id="workout_description" name="workout[description]" rows="5" wrap="virtual"><%=@workout.description%></textarea> (ie, remove the line break after your textarea tag) and you should be set. ...j --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---