11

I scaffolded in rails and instead of the general

class UtilLegalsController < ApplicationController

I got

class UtilLegalsController < InheritedResources::Base

Anyone know why? Whats the difference? What's the correct option for BAU controller?

2 Answers 2

10

May be, you are using gem which includes gem inherited_resources (for example active_admin). In this case you can generate scaffold with -c=scaffold_controller option:

rails g scaffold Post user:references title:string body:text -c=scaffold_controller

This will bypass inherited_resources controller.

6

Probably you are using a Rails environment that has the Inherited Resources gem installed. It's not a problem, once this gem, inherits from ApplicationController, and consequently extends it behavior. If you need more information, please points you browser to the AsciiCasts site, for a more complete discussion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.