Skip to content

Files

Latest commit

 

History

History
22 lines (14 loc) · 473 Bytes

Rails-ReflectionClassName.md

File metadata and controls

22 lines (14 loc) · 473 Bytes

Pattern: Malfromed reflection class name

Issue: -

Description

Checks if the value of the option class_name, in the definition of a reflection is a string.

Examples

# bad
has_many :accounts, class_name: Account
has_many :accounts, class_name: Account.name

# good
has_many :accounts, class_name: 'Account'

Further Reading