Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 497
jpw Avatar asked Jan 18 '12 23:01

jpw


1 Answers

You can do the following to override inherited_resources:

-c=scaffold_controller
like image 62
jpw Avatar answered Sep 28 '22 09:09

jpw