Re: [Rails] Re: Re: Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Hope it worked :). On Wed, Apr 28, 2010 at 05:43, Ben Woodcroft wrote: > Dhruva Sagar wrote: > > Sorry it should be : > > > > Deck.all(:joins => 'inner join cards c1 on c1.deck_id=decks.id > > inner > > join cards c2 on c2.deck_id=decks.id ', :conditions => > > ["c1.ra

[Rails] Re: Re: Re: Multiple Joins to a single table

2010-04-27 Thread Ben Woodcroft
Dhruva Sagar wrote: > Sorry it should be : > > Deck.all(:joins => 'inner join cards c1 on c1.deck_id=decks.id > inner > join cards c2 on c2.deck_id=decks.id ', :conditions => > ["c1.rank = 'Ace' AND c2.rank = 'King']) Thanks for persevering - that's what I was after. I