Sometimes I run a command like rails g controller foo index
to generate skeletons for controller and template.
Because I don\'t want to have helpers and
Looks like routes generation is hardcoded. Have a look at this method https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/controller/controller_generator.rb#L12
I think, the simplest way is to override with monkey-patch . Something like
module Rails
module Generators
class ControllerGenerator < NamedBase
def add_routes
#do nothing...
end
end
end
end
you can put it to initializer and try.