Does anyone know a way to determine if a Rails association has been eager loaded?
My situation: I have a result set where sometimes one of the associations is eager l
Use .association(name).loaded? on a record.
.association(name).loaded?
For Rails < 3.1 use loaded_foo?.
loaded_foo?
(It is deprecated since Rails 3.1. See: https://github.com/rails/rails/issues/472.)