Skip to content

Files

Latest commit

 

History

History
23 lines (15 loc) · 379 Bytes

Rails-Pick.md

File metadata and controls

23 lines (15 loc) · 379 Bytes

Pattern: Use of pluck(…​).first instead of pick

Issue: -

Description

This rule enforces the use pick over pluck(…​).first.

Examples

# bad
Model.pluck(:a).first
Model.pluck(:a, :b).first

# good
Model.pick(:a)
Model.pick(:a, :b)

Further Reading