ERb with nested loops-- NG!

How do you do nested loops in ERb?
Is it possible?
Every time I attempt it, ERb barfs.

Oh, and how can you require a .rb file and use its methods in ERb files?
Does the require line need to be in the erb.cgi file?

John J.

On 7/13/07, John J. [email protected] wrote:

How do you do nested loops in ERb?
Is it possible?
Every time I attempt it, ERb barfs.

I see no problem there. Could you post your attempt to see what’s wrong?

Oh, and how can you require a .rb file and use its methods in ERb files?
Does the require line need to be in the erb.cgi file?

I think ‘require’ can be put anywhere. It always 'require’s to the top
level context.

J.

On Jul 13, 2007, at 3:25 AM, Jano S. wrote:

Does the require line need to be in the erb.cgi file?

I think ‘require’ can be put anywhere. It always 'require’s to the top
level context.

J.

Actually could anyone post some examples of ERb for web pages, but
non-Rails?
Particularly I’d like to look at the requires and how nested loops
are handled,
but more to the point, I’m wondering if the cgi file that calls Ruby
is part of the problem.
Cgi is a big mystery to me.
Every text goes over it quickly and assumes you know it from Perl.