On Jul 26, 12:04 am, Nathan Weizenbaum <[email protected]> wrote:
> I think you're misunderstanding how caching works... it's not handled by
> Haml, it's handled by Merb, and unless you're explicitly caching the HTML,
> the result of the #rand call should never be cached. So you shouldn't need
> this helper.
Yet I do. If I don't use the helper, the logo never changes. I won't
pretend
I know why.
In the end, though, that may be a red herring.
If I use a direct partial call in place of that helper call, the page
fails to render
correctly in the same way.
Could it be choking on the processing.js stuff? I don't see why it
would. The logo partials
are 100% text, with no markup in them whatsoever.
>
> It sounds like your problem is with form_for, not with the partial/helper...
> what makes you think that the helper is causing the problem? Also, can you
> paste the HTML output that you're getting and the HTML output you expect?
>
expected/actual outputs at http://gist.github.com/155857 (look for the
form tags)
> Finally, which version of Merb are you using?
1.0.12. Been using it since the day it came out. The only thing that
changed was HAML.
>
> On Sat, Jul 25, 2009 at 11:43 PM, mpd
> <[email protected]<pope%[email protected]>
>
> > wrote:
>
> > Last time the fix was to change the helpers over to return strings
> > directly. This time i'm already doing that, but haml does not seem to
> > like me calling merb's partial method (which should return a string)
> > within a merb helper. There are no warnings or errors, but when using
> > merb's form_for on a page, haml will render form tags underneath the
> > actual form content.
>
> > i need to use partial within the helper because haml's caching
> > prevents me from randomizing the canvas logos when i use partial
> > directly within the haml template.
>
> > this is sort of confusing to put into words, so i put a hopefully
> > useful demo athttp://gist.github.com/155450
>
> > and as before, 2.0.9 does not exhibit this behavior. 2.2.2 does.
>
> > thanks.
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---