Class: RuboCop::Cop::CableReady::BroadcasterControllerAction
- Defined in:
- lib/rubocop/cop/cable_ready/broadcaster_controller_action.rb
Constant Summary collapse
- MSG =
"CableReady::Broadcaster should not be used in a Rails controller action"
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rubocop/cop/cable_ready/broadcaster_controller_action.rb', line 13 def on_send(node) return if node.method_name != :include return unless node.ancestors.any? { |ancestor| action_controller_base_class?(ancestor) } add_offense(node) end |