Unrelated, but this reminds me... are there known issues with STI and lazy loading? I had an issue the other day where all the "child" attributes on STI subclasses came up as nil when used. Changing the iteration from:
sti_collection.each do |record| ... end to: sti_collection.to_a.each do |record| ... end fixed it. On Sun, Jul 22, 2012 at 1:49 PM, Dan Kubb (dkubb) <dan.k...@gmail.com>wrote: > Hi Everyone, > > I just figured I'd share this with the list, it's a way of Eager Loading > DM associations by specifying what associations to load: > > https://gist.github.com/3100034 > > I'll probably gemify it soon, but I wanted to get it out early in case > people want to hack on it and test it out. > > -- > > Dan > > -- > You received this message because you are subscribed to the Google Groups > "DataMapper" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/datamapper/-/O0xqTr-P0XIJ. > To post to this group, send email to datamapper@googlegroups.com. > To unsubscribe from this group, send email to > datamapper+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/datamapper?hl=en. > -- Avdi Grimm http://avdi.org I only check email twice a day. to reach me sooner, go to http://awayfind.com/avdi -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to datamapper@googlegroups.com. To unsubscribe from this group, send email to datamapper+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.