I'm using Rails 3. Erubis is using some XML::Builder with indent set
to 2.

I suspect Haml won't be of help either, since it'll delegate to Erubis
at some point.

the <%- only unindents a block to align with its closests <%= render
parent. Can't go further than that.

On Feb 17, 11:08 pm, djangst <[email protected]> wrote:
> To solve the indentation problem, don't indent the tags in your
> templates. You may have to experiment, but the result should be what
> you want.
>
> With ERB I've found that I can have either nicely aligned templates,
> or somewhat nicely aligned HTML output. I write "somewhat" because it
> never seems to be quite right, and the whole thing seems ugly and
> awkward (surprising in Rails-land).
>
> If anyone has a solution for this problem (besides Haml), please
> respond. :)
>
> The other common issue is empty lines between code blocks. With Erubis
> you can fix this by changing closing tags from "%>" to "-%>".
>
> On Feb 16, 11:19 pm, khoan <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > I'd like to unindent a block of ERB specifically to combat the extra
> > spacing being added to content inside <textarea> by the browser. Is
> > there such a feature in ERB?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to