Re: capture eruby

From: [email protected] [mailto:[email protected]] On Behalf Of dc

is there a way to capture the output of eruby?
i want a templating parser, but not to the screen, just for
my own capture.

Use ERB - it’s the pure ruby implementation, and returns string values,
which you can choose to send to stdout, a file, etc.

i understand helperclass methods are not available in controllers.
where is the recommended ROR place for putting your own classes?

I’m not sure if it’s the ‘recommended’ place, but I personally put my
own ruby library file in /lib/basiclib.rb, and put “require ‘basiclib’”
at the bottom of config/environment.rb. Seems to work nicely.