Thank you for your reply!

/www/scents> haml -v
Haml 1.8.2

That is the latest, I hope :)

The output of the text_area helper, using rhtml has extra spaces, like
an indent in front of every new line.(looking at them in Textmate -
they appear to be spaces. To clearly illustrate I've uploaded a
picture. One using haml(and the ~) and the other using rhtml.

%label Text
~ form.text_area :text

%label With RHTML
= render :partial => 'rhtml', :locals => {:form => form}

I've uploaded a file to illustrate.

http://haml.googlegroups.com/web/SafariScreenSnapz001.png?gsc=Z2yGngsAAAAlcxHy1jDPjqCkFHI4E4j7

#_rhtml.rhtml
<%= form.text_area :text %>

Looking at the field in the db, raw, those characters are not in
there, as they are shown in the second textarea above.

So, active record, I think is pulling them from the db and adding the
spaces. I think!

I really dig haml!

Thanks again, :Voodoo

On Apr 28, 1:34 pm, "Nathan Weizenbaum" <[EMAIL PROTECTED]> wrote:
> What version of Haml are you using? What's the output from the text_area
> helper and what do you expect it to be?
>
> On Mon, Apr 28, 2008 at 9:26 AM, voodoorails <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > After installing haml my rhtml files (in a fairly large app which I
> > intended to keep much of the rhtml until a later time -running both in
> > parallel and migrating as nec.) the text area problem with spaces
> > cropped up in my rhtml. For awhile it did not occur to me it might be
> > haml altering the output of rhtml files. This issue kicked me pretty
> > hard for a day or so and my solution was to not use text_area in my
> > app and just use raw html instead and a regex, for example.
>
> > <textarea cols="40" id="product_title" name="product[title]"
> > rows="20"><%= @product.title.gsub(/\r\n/, "\r") %></textarea>
>
> > Which allowed me to move forward, which was some relief but that is
> > pretty ugly for sure.
>
> > So, if you intend to use both you might need to do that? Or is there a
> > better way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to