Skip to content

Files

Latest commit

 

History

History
28 lines (18 loc) · 564 Bytes

Rails-ScopeArgs.md

File metadata and controls

28 lines (18 loc) · 564 Bytes

Pattern: Use of plain method call instead of lambda/proc

Issue: -

Description

This rule checks for scope calls where it was passed a method (usually a scope) instead of a lambda/proc.

Examples

# bad
scope :something, where(something: true)

# good
scope :something, -> { where(something: true) }

Default configuration

Attribute Value
Include app/models/**/*.rb

Further Reading