Rails 3.1: how to override inherited_resources and allow scaffolding to work properly again?

SOLUTION FOUND: see comment

Construction of new rails 3.1. Started with the blog_entries base model to get it. No surprises.

Then I added ActiveAdmin, getting this working with my existing model.

But now when I try to fake a new model / etc as follows:

rails g scaffold Community name:string guid:string 

everything seems to be correct (views, migration), except that the controller has no CRUD parameters and looks like this:

 class CommunitiesController < InheritedResources::Base end 

The problem is that ActiveAdmin uses inherited_resources, which prevents manual rails from working properly.

Does anyone know a way to make rails "fit" correctly, despite ActiveAdmin using inherited_resources?

+8
ruby-on-rails scaffolding activeadmin
source share
1 answer

You can do the following to override inherited_resources :

 -c=scaffold_controller 
+10
source share

All Articles