Ruby on Rails Wednesday, April 2, 2014

I'm trying to optimize some of my queries by taking advantage of eager loading.

I've created a gist with the specific problem I'm seeing here: https://gist.github.com/tybenz/9944205

Any ideas why the eager loading works for grabbing the collection from the rails console but a SQL query is required when I try to access the collection from inside the instance method?

Is there anything I can do to fix this?

Thanks,
Tyler

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/77cb25cd-00b2-46b4-8657-ceec1d10b350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment