We typically aren't in the habit of correcting the formatting/other 
issues of plugins - just the ActionView core. However, you do have a few 
options. Probably the best of these is Haml's built-in object_ref 
functionality:

[EMAIL PROTECTED] Hello!

becomes

<div id="person_12345" class="person">Hello!</div>

This works for any tag, of course. It's not quite as robust as div_for, 
in that it doesn't allow for multiple object refs per instance per page, 
although we're planning on making [EMAIL PROTECTED] make <div 
id="foo_person_12345" class="person"> in 1.5.

You could also manually add the attributes using the simply_helpful 
stuff, like:

%div{id => dom_id(@person), class => dom_class(@person)}

Or, you could write your own helper function. There are lots of 
functions in Haml::Helpers that are designed to help stuff like this - 
in particular, check out lib/haml/helpers/action_view_mods.rb for good 
examples of what you're trying to do.

- Nathan

Thibaud Guillaume-Gentil wrote:
> We have the same problem, with the  - div_for block (from
> simply_helpful)
>
> I think's it's the same correction in the trunk, no? :-)
>
> Thank's!
>
> Thibaud

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