2009/10/12 Leonardo Mateo <[email protected]>: > > On Mon, Oct 12, 2009 at 3:42 PM, Max Williams > <[email protected]> wrote: >> >> Thanks, but why would i need an intermediate table? the users table is >> already linked to sign_ins via sign_ins.user_id. > > Then it should be simpler, you would only need one INNER JOIN. >
You should not need any joins, Rails should do all that for you from the associations. First I would forget about the fact that you want a named scope and work out the find that gives the required records. Have you done that? Then convert it to a named scope. Colin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

