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.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedApr 3, '14 at 6:06a
activeApr 3, '14 at 6:06a
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Tyler Benziger: 1 post

People

Translate

site design / logo © 2022 Grokbase