|
Hi all, I'm using the relatively new form of render with layouts and partials, namely # some_action.haml =render( :partial => 'fragment', :layout => 'specialised' ) #_fragment.haml %p==some #{dynamic} content #_specialised.haml %h1==cheap and #{changable} = yield And that works fine and dandy. I get a heading and a para But if I use the block form, # some_action.haml =render( :layout => 'specialised' ) do %h1==cheap and #{changable} , I get the heading and para twice, e.g. heading para heading para The block form works fine if I use the erb templates e.g. <!-- in posts/show.html.erb - stolen from ryans post --> <% render(:layout => 'boxed', :locals => {:post => @post}) do %> <%= post.title %> published on <%= post.published_at %> <% end %> Its only if I use haml with block form do I get repetition. Haml with explicit partial templates is fine, as are erb template with blocks or partials. You can see examples of this at (non-block form) http://haml.heroku.com/users/sample/1 (block form) http://haml.heroku.com/users/broken/1 L --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |
- [haml] repeated rendering when using render with a layou... leif.eriksen
- [haml] Re: repeated rendering when using render wit... Nathan Weizenbaum
- [haml] Re: repeated rendering when using render... leif.eriksen
- [haml] Re: repeated rendering when using render... leif.eriksen
