Hi all.  I'm trying to write a helper function that will let me use
something like the following in my view, where I can pass in a text
block as the last argument:

<%= code "java", <<-CODE

        // create a panel using a GridBagLayout
        JPanel panel = new JPanel (new GridBagLayout());

        // three labels on the first row
        panel.add (new JLabel ("One"));
        panel.add (new JLabel ("Two"));
        panel.add (new JLabel ("Threeeee"));

CODE %>

but this produces this error in the merb console (and merb dies):

can't find string "CODE" anywhere before EOF

So it can't find the end of the heredoc.  Does anyone know how to get
this to work?  I suspect it's more of an erb issue than merb, but I
thought the hacker mentality might be able to solve this one. :)

Thanks for any help.

- Jake

--

You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en.


Reply via email to