When I load the haml code from database and do Haml::Engine.new(HAML
CODE).render(self), I get "no block given", and it only works when I
delete the "= yield" and "= yield :sidebar". The same code also works
if I put the haml code into an ".html.haml" file.

Any idea?
Thanks

(haml):20:in `render'
haml (3.1.2) lib/haml/engine.rb:181:in `render'
haml (3.1.2) lib/haml/engine.rb:181:in `instance_eval'
haml (3.1.2) lib/haml/engine.rb:181:in `render'
app/helpers/application_helper.rb:3:in `render_haml'
app/views/layouts/spree_application.html.haml:1:in
`_app_views_layouts_spree_application_html_haml___969447830__621685708_0'
actionpack (3.0.9) lib/action_view/template.rb:135:in `send'
actionpack (3.0.9) lib/action_view/template.rb:135:in `render'
activesupport (3.0.9) lib/active_support/notifications.rb:54:in
`instrument'
actionpack (3.0.9) lib/action_view/template.rb:127:in `render'
actionpack (3.0.9) lib/action_view/render/layouts.rb:80:in
`_render_layout'
actionpack (3.0.9) lib/action_view/render/rendering.rb:62:in
`_render_template'
activesupport (3.0.9) lib/active_support/notifications.rb:52:in
`instrument'
activesupport (3.0.9) lib/active_support/notifications/instrumenter.rb:
21:in `instrument'
activesupport (3.0.9) lib/active_support/notifications.rb:52:in
`instrument'
actionpack (3.0.9) lib/action_view/render/rendering.rb:56:in
`_render_template'
actionpack (3.0.9) lib/action_view/render/rendering.rb:26:in
`render_without_haml'
haml (3.1.2) lib/haml/helpers/action_view_mods.rb:13:in `render'
actionpack (3.0.9) lib/abstract_controller/rendering.rb:115:in
`_render_template'
actionpack (3.0.9) lib/abstract_controller/rendering.rb:109:in
`render_to_body'
actionpack (3.0.9) lib/action_controller/metal/renderers.rb:47:in
`render_to_body'
actionpack (3.0.9) lib/action_controller/metal/compatibility.rb:55:in
`render_to_body'
actionpack (3.0.9) lib/abstract_controller/rendering.rb:102:in
`render_to_string'
actionpack (3.0.9) lib/abstract_controller/rendering.rb:93:in `render'

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