Class: RuboCop::Cop::Platanus::NoFlashInApi
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Platanus::NoFlashInApi
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/platanus/no_flash_in_api.rb
Overview
Flash shouldn’t be used in API controllers.
Constant Summary collapse
- MSG =
"Don't use `flash` in API controllers."
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/rubocop/cop/platanus/no_flash_in_api.rb', line 38 def on_send(node) return unless flash?(node) add_offense(node) do |corrector| corrector.remove(node) end end |