That's fantastic! Great thinking, Drew!

If you wouldn't mind though, I have called 'feature freeze' on Haml
1.5, so this is going to have to wait till after the release. However,
I'd love to accept a formal patch on it (with tests!).

-hampton.



On Feb 13, 3:25 pm, "Drew  Sears" <[EMAIL PROTECTED]> wrote:
> thanks nathan!
>
> for anyone who cares, i implemented this locally by updating the
> following method in lib/haml/buffer.rb:
>
> def parse_object_ref(ref)
>   # Let's make sure the value isn't nil. If it is, return the default
> Hash.
>   return {} if ref[0].nil?
>   class_name = ref[0].class.to_s.underscore
>   class_name << "_#{ref[1].to_s}" unless ref[1].nil?
>   {:id => "#{class_name}_#{ref[0].id}", :class => "#{class_name}"}
> end
>
> subsequently, this haml:
>
> [EMAIL PROTECTED]
>   [EMAIL PROTECTED], 'updated_at'] beats me!
>
> generates this html:
>
> <div class='item' id='item_5'>
>   <span class='item_updated_at' id='item_updated_at_5'>beats me!</
> span>
> </div>
>
> On Feb 13, 12:17 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>
> > That could definitely work. Trunk is on feature-freeze right now, but I
> > could see that making it into the version after 1.5.
>
> > - Nathan
>
> > Drew Sears wrote:
> > > how about [EMAIL PROTECTED], 'updated_at'] ?- Hide quoted text -
>
> > - Show quoted text -


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