Class: RuboCop::Cop::Rails::ApplicationMailer

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

Overview

Checks that mailers subclass ‘ApplicationMailer` with Rails 5.0.

Examples:


# good
class MyMailer < ApplicationMailer
  # ...
end

# bad
class MyMailer < ActionMailer::Base
  # ...
end

Constant Summary collapse

MSG =
'Mailers should subclass `ApplicationMailer`.'
SUPERCLASS =
'ApplicationMailer'
BASE_PATTERN =
'(const (const {nil? cbase} :ActionMailer) :Base)'

Constants included from TargetRailsVersion

TargetRailsVersion::TARGET_GEM_NAME, TargetRailsVersion::USES_REQUIRES_GEM_API

Method Summary

Methods included from TargetRailsVersion

minimum_target_rails_version, support_target_rails_version?

Methods included from EnforceSuperclass

included, #on_class, #on_send