Dhruva Sagar wrote:
> Hi,
> 
> Can't your sql be :
> 
> select * from decks d
> inner join cards c1 on c1.deck_id=d.id
> where
> c1.rank = 'Ace' and
> c1.rank = 'King';

Unfortunately I don't think so. c1 cannot be both an ace and a king at 
the same time. I just tested your code on a rails setup with a has_many 
and belongs_to and it didn't work.
-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to