views:

610

answers:

1

Question: Instead of getting transformed output from my ERB template, is there a parameter, setting or hack I can use that will output the raw ruby code that gets generated right before the transformation runs?

Rationale: I am having trouble figuring out the problem with an ERB template syntax error, and I would like to see the plain ruby code that gets generated by ERB. If anyone else has any alternative methods for debugging and tracking down specific problems in ERB, please chime in.

TIA

+2  A: 

You can get info about the objects you're using with debug(@object). That may help to see exactly what you're working with and what you can do with it.

Jarrod