class RuboCop::Cop::Rails::ScopeArgs

scope :something, -> { where(something: true) }
# good
scope :something, where(something: true)
# bad
@example
a method (usually a scope) instead of a lambda/proc.
This cop checks for scope calls where it was passed

def on_send(node)

def on_send(node)
  return unless command?(:scope, node)
  _receiver, _method_name, *args = *node
  return unless args.size == 2
  second_arg = args[1]
  add_offense(second_arg, :expression) if second_arg.type == :send
end