For a while, we were recommending that people use #find_and_preserve rather than ~. However, since everyone seems to prefer ~, we should probably add it back into the docs.
And as soon as we get around to writing an FAQ, that'll be the first thing on it. - Nathan On Jan 12, 2008 8:28 PM, Erik Peterson <[EMAIL PROTECTED]> wrote: > > Man, Ok, I get it. You have to use ~ > ~ f.text_area :body, :rows => 30, :cols => 120 > > Not in the documentation. Uncool. > > (Don't want to sound like a prick. Really. haml is awesome. Just > kind of rough around the edges. And sometimes rough edges can cut you > and give you tetanus. And even though you love that old, rusty > Studebaker, you're still upset that you have tetanus. Good thing that > tildes are like tetanus shots, man. Good thing.) > > On Jan 12, 11:21pm, Erik Peterson <[EMAIL PROTECTED]> wrote: > > Ok, so when I have a textarea, I'll declare it thusly: > > %p > > %b Body > > %br/ > > = f.text_area :body, :rows => 30, :cols => 120 > > > > Which works, except when I edit the form and the text is put into the > > textarea, there are all these spaces at the beginning of every newline > > within the textarea, due to the indention loveliness going on. > > > > So no problem, right? Just use tab_down and get it back down to where > > it should be. Right? Wrong. This haml file is rendered within a > > layout file, and tab_down won't go any further than the base indention > > for the file that tab_down is being called in. So, while the > > text_area line within edit.html.haml only has an indentation of 4 > > spaces, it has an indention within application.html.haml- > > > > >edit.html.haml of 14 lines. > > > > Anyone have any workarounds? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
