I'm trying to do something like this, but it's not working. How would I do this in Rails 3?
Student.find(12).includes(:teacher)
I'm trying to do something like this, but it's not working. How would I do this in Rails 3?
Student.find(12).includes(:teacher)
There is no sense to use find with includes.
Eager loading helps us to load the associated records of the objects to prevent n+1 problem. With only one record you will never experience n+1 problem.