- Defined in:
The accessed_columns plugin records which columns have been accessed for a model instance. This is useful if you are looking to remove other columns from being SELECTed by the dataset that retrieved the instance, which can significantly improve performance:
a = Album a.accessed_columns #  a.name a.accessed_columns # [:name] a.artist_id a.accessed_columns # [:name, :artist_id]
Note that this plugin should probably not be used in production, as it causes a performance hit.
# Make all model subclass instances record accessed columns (called before loading subclasses) ::. :accessed_columns # Make the Album instances record accessed columns Album.plugin :accessed_columns
Defined Under Namespace