Scaffold invoking Custom Generator

Hi Guys,

I created a custom generator and I would like hook it to the scaffold generator, so whenever the scaffold generator is called, my generator is also called.

To achieve that i did this:

config.generators do |g|

g.helper :my_custom

end

It works, but I have to concerns:

First, I had to replace one generator (helper). Is possible to add a new generator to the scaffold call, instead of replace one?

Second, I know that some gems like RSpec and Haml are able to replace generators (test_framework and templates, respectively) without change the config/application.rb, how is that possible?