Depending on the version of Rails, capture may have slightly different
semantics when the block its passed was created in a plain Ruby context
rather than a Haml context.

On Wed, Jun 16, 2010 at 11:06 PM, Kevin <[email protected]> wrote:

> Ah!  Thanks.
>
> Is there any difference then between capture and capture_haml besides
> working outside of rails?
>
> Thanks,
> Kevin
>
> On Jun 15, 8:29 pm, Nathan Weizenbaum <[email protected]> wrote:
> > It looks like your own original code used #capture. #capture is a Rails
> > helper method; it doesn't exist unless you're running Rails. You tried to
> > run your Haml file outside of Rails, which is why you got the error
> message
> > you did. Given the circumstances, I think this is a reasonable error
> > message.
> >
> >
> >
> > On Tue, Jun 15, 2010 at 7:42 PM, Kevin <[email protected]> wrote:
> > > html2haml -e converted my code for me:
> >
> > > - @my = capture do
> > >  test
> >
> > > gives a confusing error message:
> >
> > > Exception on line 1: undefined method `capture' for #<Object:
> > > 0x101869960>
> > >  Use --trace for backtrace.
> > >  Use --trace for backtrace.
> >
> > > switching it to capture_haml worked, but only after a few hours of
> > > debugging :)
> >
> > > Might be nicer for new users to include a mention of capture in the
> > > error message and/or the documentation.  Or maybe its a bug, I don't
> > > know :)
> >
> > > Thanks for a fun project!
> >
> > > --
> > > 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