Categories
Programming

The Magical Attribute Reader

Here’s a common pattern and good rails thing to know about: read_attribute(:symbol)

Basically what it does is read the attribute from the object’s database field, even if you have over-ridden the name of that attribute with a virtual attribute of the same name.