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) scope?(node) do |second_arg| add_offense(second_arg) end end