Class: Atreides::AdminController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Atreides::AdminController
- Defined in:
- app/controllers/atreides/admin_controller.rb
Direct Known Subclasses
Admin::Atreides::ContentPartsController, Admin::Atreides::FeaturesController, Admin::Atreides::GithubController, Admin::Atreides::LinksController, Admin::Atreides::MessagesController, Admin::Atreides::OrdersController, Admin::Atreides::PagesController, Admin::Atreides::PhotosController, Admin::Atreides::PostsController, Admin::Atreides::ProductsController, Admin::Atreides::SizesController, Admin::Atreides::TagsController, Admin::Atreides::UsersController, Admin::Atreides::VideosController
Class Method Summary collapse
Class Method Details
.inherited(base) ⇒ Object
4 5 6 7 8 9 |
# File 'app/controllers/atreides/admin_controller.rb', line 4 def self.inherited(base) super resource_class_name = base.name.sub(/Admin::/, '').sub(/Controller/, '').singularize base.resource_class = resource_class_name.constantize base.resources_configuration[:self][:request_name] = base.resource_class.to_s.sub(/Atreides::/, '').underscore.gsub('/', '_') end |