Hi,
I am trying to use a rails helper in a haml filter, is it possible somehow?

Something like this maybe:

module Haml::Filters::Javascript
  def render_with_options(text,options)
    content_for(:javascript) {
      text.rstrip.gsub("\n", "\n    ")
    }
  end
end

Would love for some help, since right now it errors with

undefined method `content_for' for Haml::Filters::Javascript:Module

which is understandable ... do I need to include some kind of rails module
or something?

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