Following can be useful in tracking N+1 queries, imagine you have a User with many Photos:
the code above would tell you if the association has been already loaded. It proved useful when trying to track down a N+1 query when serializing to JSON.
Developer from somewhere
Following can be useful in tracking N+1 queries, imagine you have a User with many Photos:
the code above would tell you if the association has been already loaded. It proved useful when trying to track down a N+1 query when serializing to JSON.