Class: RuboCop::Cop::Rails::ApplicationController

Inherits:
Base
  • Object
show all
Extended by:
AutoCorrector
Includes:
EnforceSuperclass
Defined in:
lib/rubocop/cop/rails/application_controller.rb

Overview

Checks that controllers subclass ‘ApplicationController`.

Examples:


# good
class MyController < ApplicationController
  # ...
end

# bad
class MyController < ActionController::Base
  # ...
end

Constant Summary collapse

MSG =
'Controllers should subclass `ApplicationController`.'
SUPERCLASS =
'ApplicationController'
BASE_PATTERN =
'(const (const {nil? cbase} :ActionController) :Base)'

Method Summary

Methods included from EnforceSuperclass

included, #on_class, #on_send