dreftymac
dreftymac

Reputation: 32370

ruby ERB template debugging, display as ruby

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

Upvotes: 1

Views: 1813

Answers (1)

Jarrod
Jarrod

Reputation: 2378

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.

Upvotes: 2

Related Questions