Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Controller InheritedResources::Base

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?

like image 887
Pykih Avatar asked Dec 11 '11 09:12

Pykih


2 Answers

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.

like image 92
Jiemurat Avatar answered Nov 10 '22 15:11

Jiemurat


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.

like image 35
ABaaklini Avatar answered Nov 10 '22 15:11

ABaaklini