Very cool, but I don't like that the interpolation is just defined for 
this filter. I've always planned to add some facility to give filters 
access to the surrounding context, and I feel like interpolation should 
take advantage of that. I've got some ideas that I'm hacking on right 
now... I'll see if I can get a commit pushed tonight. Once that's in, 
defining this filter should be much easier.

Also, a bit of a nitpick, but I prefer :javascript to :inline_javascript 
for the filter name.

- Nathan

Les Hill wrote:
> Hi!
>
> This is an unsolicited patch to allow undisturbed javascript in your
> Haml (similar to the :plain filter with the sugar from the filter
> mentioned here: http://groups.google.com/group/haml/msg/2d890cf1ede761ea
> ) *and* allow you to access the view variables using the familiar ==
> (double quoted string) syntax for ruby interpolation (and this is not
> similar to any other filter):
>
> :inline_javascript
>   function use_instance() {
>     alert('Hello ' + '[EMAIL PROTECTED]')
>   }
>
> Find the git patch here:
>
> http://pastie.org/156177
>
> For any that might be interested right now, the monkey patch for Rails
> is described here (for gem version 1.8.0) :
>
> http://groups.google.com/group/rubyjax/msg/d5a83147349bff1f
>
> Thanks for Haml!
> >
>
>   


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