Aldric Giacomoni wrote: > Frederick Cheung wrote: > >> If they are two separate databases then you'll probably have to do >> this mostly in ruby (ie grab a record from one table then see if it >> exists in the other table). If both tables were in the same database >> you could probably write this as a join, but not if the tables are not >> in the same database >> >> Fred > > In short - there's no clean way in Rails to do this?
Sure there is. Use the :joins option on find and you'll get what you need. > It's a pure SQL > solution? I don't see why it would have to be. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

