Search code examples
ruby-on-railsactiveadminscaffolding

rails 3.1: how override inherited_resources and permit rails scaffolding to work normally again?


SOLUTION FOUND: See comment

Building a new rails 3.1 app. Started with a basic blog_entries model to get the hang of it. No surprises.

Then I added ActiveAdmin, got that working okay with my existing model.

But now when I try to scaffold a new model/etc with this:

rails g scaffold Community name:string guid:string

everything seems right (views, migration) except the controller does not have CRUD options and looks like this:

class CommunitiesController < InheritedResources::Base
end

The problem is that ActiveAdmin uses inherited_resources which prevents manual rails scaffolding from working normally.

Does anyone know a way to force rails to scaffold "correctly" despite ActiveAdmin using inherited_resources?


Solution

  • You can do the following to override inherited_resources:

    -c=scaffold_controller