heh, and problem solved.

I was using haml_concat which worked previously, but no longer does.
Returning a string directly solved the problem.

'How to write view helpers with haml' was something I could not find
much documentation on when I wrote that code.
The uses of haml_concat, haml_tag, and all that I mean.Obviously I did
something wrong along the way ;)

Anyway, thanks!

On Jul 14, 10:42 pm, Nathan Weizenbaum <nex...@gmail.com> wrote:
> Merb helpers never inject text directly into the template; they always
> return strings. Thus you should be able to at least replace the helper calls
> with the literal strings that they output.
>
> On Tue, Jul 14, 2009 at 6:04 PM, mpd
> <pope...@jesters-court.net<pope%2...@jesters-court.net>
>
> > wrote:
>
> > Unfortunately I cannot repeat it on the command line. I believe I
> > would need to be able to call view helpers to actually inject text
> > like a real app would to repeat it. In the real app, the problem only
> > happens if I call the view helper within the application/processing
> > tags. If I embed text directly, it works, but that won't work for me
> > in the long run. I'm using Merb 1.0.12 if that makes a difference. I'm
> > not sure where Haml stops and Merb begins in this case.
>
> > If there's anything else I can help to debug this, please let me know.
> > I don't want to change view layers :/
>
> > On Jul 13, 10:27 pm, Nathan Weizenbaum <nex...@gmail.com> wrote:
> > > That sounds like a bug. Can you find a minimal example of this that can
> > be
> > > run with the haml command-line tool, and post it at gist.github.com so
> > > google groups doesn't reformat the code? Thanks!
>
> > > On Sun, Jul 12, 2009 at 4:39 PM, mpd
> > > <pope...@jesters-court.net<pope%2...@jesters-court.net<pope%252...@jesters-court.net>
>
> > > > wrote:
>
> > > > After recently upgrading to 2.2 (2.2.1 also exhibits this behavior,
> > > > 2.0.9 does not.), a processing.js script I had on my page is now being
> > > > injected into the wrong place, and I'm not sure why.
>
> > > > The haml:
>
> > > > #header
> > > >  = js_include_tag 'processing_init'
> > > >  %script{:type => 'application/processing', 'data-canvas_name' =>
> > > > 'login'}
> > > >    = processing_script
> > > >  %canvas#login{:width => "755px", :height => "100px"}
> > > >    If you can't see a pretty picture here, you are not going to get
> > > > much out of this place.
>
> > > > processing_script is a view helper that emits the processing.js code
> > > > to run as a string. It's omitted for brevity.
>
> > > > 2.0.9 renders the helper output within the application/processing
> > > > script tags as expected.
>
> > > > 2.2.1 renders the helper output directly within #header as text, and
> > > > the processing script tags are empty.
>
> > > > Did I miss an upgrade note somewhere?
>
> > > > thanks,
>
> > > > -mpd
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to haml@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to