Pattern: Use of read_attribute
/write_attribute
Issue: -
This rule checks for the use of the read_attribute
or write_attribute
methods.
# bad
x = read_attribute(:attr)
write_attribute(:attr, val)
# good
x = self[:attr]
self[:attr] = val
Attribute | Value |
---|---|
Include | app/models/**/*.rb |