Ruby on Rails ActiveRecord: eager loading issue with foreign and primary key
- by Krishnaswamy Subramanian
The eager loading on Ruby on Rails is not working properly for the following scenario.
First we had a model called marks which has the following fields
id, student, subject, mark
the student is a string column which has the active directory login value, later on for reporting functionality we introduce another table called user which has the…