no, it does not work in erb! strange thing! i tried
<%= h(yield(:title) || "Foo") %> and in the view <% title "Bar" %> same error: ActionView::Template::Error (undefined method `title' for #<Class>) on line #1 (see the full error output at http://pastie.org/871283 ) what can be the problem? On Mar 16, 12:09 am, Nathan Weizenbaum <nex...@gmail.com> wrote: > This sounds like a Rails issue, not a Haml issue. Does it work in ERB? > > > > On Mon, Mar 15, 2010 at 4:06 PM, mz <m.ze...@gmail.com> wrote: > > i am trying to get the usual yielding of the page title done with the > > current rails3 master and the latest haml. > > unfortunately it seems to not work anymore. > > > this works in rails2 but not in rails3: > > > %title > > = h(yield(:title) || "Untitled") > > > and in the view > > > - title 'Home' > > > this would produce this error in rails3: > > undefined method `title' for #<Class> > > > anyone has a clue what is going on? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Haml" group. > > To post to this group, send email to h...@googlegroups.com. > > To unsubscribe from this group, send email to > > haml+unsubscr...@googlegroups.com <haml%2bunsubscr...@googlegroups.com>. > > For more options, visit this group at > >http://groups.google.com/group/haml?hl=en. -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to h...@googlegroups.com. To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/haml?hl=en.