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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With