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 )
You just have to be more careful with the order of the methods in this case:
Student.includes(:teacher).find(12)
You could try "where" instead of "find":
Student.includes(:teacher).where(:id => 12)