This is definitely not a Haml issue. I suggest you ask the Rails folks.

On Mon, Mar 15, 2010 at 4:33 PM, mz <[email protected]> wrote:

> 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 <[email protected]> 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 <[email protected]> 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 [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<haml%[email protected]><
> haml%[email protected]<haml%[email protected]>
> >.
> > > 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected] <haml%[email protected]>.
> 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 [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