How to override inherited_resources with rails scaffold

I use the active_admin stone in my Rails 3 application, which has an inherited_resource dependency. I'm a little newbie and would rather avoid the black boxes of inherited_resources for my own controllers, however, when I run the rails g scaffold command by default, the controllers that are created are inherited from inherited_resources. I know that I can manually override this, inheriting from the ApplicationController, however, I would like to be able to create default rail scaffolding if possible.

+5
source share
2 answers

-c = scaffold_controller

config/application.rb

config.generators do |g|
  g.scaffold_controller "scaffold_controller"
end
+12

All Articles