Anybody know a shortcut way of generating a controller that inherits from something different than ApplicationController?
I currently run:
rails g controller Admin::Food
but it creates
class Admin::FoodsController < ApplicationController
when I actually want:
class Admin::FoodsController < AdminController
Thanks!
The Rails controller generator will not allow you to specify the superclass. You will need to edit this file and set the superclass manually.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.