Class: RuboCop::Cop::Salsify::RailsUnscoped
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Salsify::RailsUnscoped
- Defined in:
- lib/rubocop/cop/salsify/rails_unscoped.rb
Overview
Check that Activerecord scopes do not use ‘unscoped`
Constant Summary collapse
- MSG =
'Explicitly remove scopes instead of using `unscoped`.'
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
22 23 24 25 26 |
# File 'lib/rubocop/cop/salsify/rails_unscoped.rb', line 22 def on_send(node) return unless unscoped?(node) add_offense(node, location: :expression, message: MSG) end |