ludicco
unread,Aug 31, 2009, 12:58:02 PM8/31/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Haml
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