Haml does its best to re-format helpers like this to make them fit better
with Haml's nice output. However, we can't go completely re-writing all the
Rails helpers to make the output nice. Since form_for is a Rails helper, we
can't go in and tweak how it generates the HTML to make it prettier, as much
as we'd like it to be.

On Mon, Aug 31, 2009 at 9:58 AM, ludicco <[email protected]> wrote:

>
> Hello, first thing, congratulations for the beautiful job.
> I really love deal with HAML instead raw xhtml development.
>
> Well, I have a question:
> Is there a proper way to format/indent that extra lines generated by
> rails helpers such form_for?
> for example:
> ---
> - form_for @user do |f|
>  = f.label :name, "Your Name"
>
> ---generates--
>
> <form action="/users" class="new_user" id="new_user"
> method="post"><div style="margin:0;padding:0;display:inline"><input
> name="authenticity_token" type="hidden" value="gOnWFvTBWpYHqfrwDuu66M/
> Yi3JGfucxJx3m4WtnBKM=" /></div>
>      <label for="user_name">Your Name</label>
> </form>
>
> *note that the form, div and input are on the same line, no line
> breaks
>
> --and not--
>
> <form action="/users" class="new_user" id="new_user" method="post">
>  <div style="margin:0;padding:0;display:inline">
>    <input name="authenticity_token" type="hidden"
> value="gOnWFvTBWpYHqfrwDuu66M/Yi3JGfucxJx3m4WtnBKM=" />
>  </div>
>  <label for="user_name">Your Name</label>
> </form>
>
> --
> This is nothing about the functionality because its perfect on this
> side, its more aesthetic, since its one of the main reasons I use
> HAML.
>
> Thanks in advance
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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