Hi, I'm trying to sum up the records in a related table that used to just be a child table. This line used to work:
table1.sum(:enrich_bead_count_hemo, :conditions => "table2_id = " + id.to_s) now I've got an intermediate "has and belongs to many" = HABTM table inbetween them. Could somebody help me figure out how to sum across two tables? I'm thinking i might have to use the custom SQL "join" attribute of the sum method. Thanks, Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

