I tried to call render method from Haml::Engine, passing the scope as
an Object and I get an error
/Library/Ruby/Gems/1.8/gems/haml-2.0.2/lib/haml/helpers.rb:262:in
`puts': undefined method `buffer' for nil:NilClass (NoMethodError)
But if I pass string as the scope it will be fine.
e.g
class QuickRenderer
def version
@version ||= 1
end
def out
puts Haml::Engine.new("%p= version").render(self)
end
end
I was expecting that the template scope will be the QuickRenderer
instance itself by passing "self" as the scope.
I tried with
Haml::Engine.new("%p= version").render(binding)
doesn't work as well. Any idea?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---