emit scaffold controllers ?

I would like to emit (thru eval) some controller code via a plugin. Basically the plugin will get the list of tables, and emit a controller with scaffold: for each table (model). Is it possible to do that somehow ?

I can emit the proper code in a plugin, but the rails logic seems to only look for controller classes in the controller directory.

- Thanks, Andrew