On May 7, 2010, at 16:02 , Chris McCann wrote: > This seems like a trivial problem but I'll be darned if I can get it > to work using ActiveRecord methods.
tl;dr :-) but I generally find when I start wondering about things like this that some custom SQL is usually the best answer, and will usually be considerably more efficient than doing it with Rails anyway. Regards, Guyren G Howe Relevant Logic LLC guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178 Ruby/Rails, REALbasic, PHP programming PostgreSQL, MySQL database design and consulting Technical writing and training Read my book, Real OOP with REALbasic: <http://relevantlogic.com/oop-book/about-the-oop-book.php> -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
