Oh, if you're layout's Haml, master branch won't fix it. Using "~ yield" 
instead of "= yield" will, though (although if you want to convert all 
your templates, more power to you).

voodoorails wrote:
> My layout *is* Haml!!! That must be it - sorry I had not thought of
> that. I may try to upgrade to the master branch but until then this
> just gives me ample incentive to migrate everything.
>
> On Apr 28, 11:31 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>   
>> This happens to templates that don't pass through Haml at all? That's
>> not good... I don't know why it would be happening, though. Is your
>> layout written in Haml? Does the problem persist when you upgrade to the
>> most recent master branch?
>>
>> voodoorails wrote:
>>     
>>> I should not have posted a partial from haml. An rhtml file, that is
>>> not a partial pulled in from a haml file,  still shows the same spaces
>>> - like it does in the second textarea in the image above.
>>>       
>>> In other words, my other pre-haml rthml files, unless I override them
>>> like I did in the first post, still contain errant spaces.
>>>       
>>> The fix is to get off my bum and use all haml - and I can live with
>>> that :)
>>>       
>>> On Apr 28, 5:12 pm, "Nathan Weizenbaum" <[EMAIL PROTECTED]> wrote:
>>>       
>>>> Oh, I see. You still need to use ~ when you're rendering partials, so that
>>>> it'll continue to preserve the formatting of the textarea.
>>>>         
>>>> On Mon, Apr 28, 2008 at 2:58 PM, voodoorails <[EMAIL PROTECTED]>
>>>> wrote:
>>>>         
>>>>> 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=Z2yGngs...
>>>>>           
>>>>> #_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