Skip to content

Files

Latest commit

 

History

History
21 lines (13 loc) · 423 Bytes

Rails-EnvLocal.md

File metadata and controls

21 lines (13 loc) · 423 Bytes

Pattern: Missing use of Rails.env.local?

Issue: -

Description

Checks for usage of Rails.env.development? || Rails.env.test? which can be replaced with Rails.env.local?, introduced in Rails 7.1.

Examples

# bad
Rails.env.development? || Rails.env.test?

# good
Rails.env.local?

Further Reading