Hi Guys,
If I may explain my problem with an example.
Models:
Monitor (computer monitors)
has_many :features
Feature:
name = [big, small, black, white]
I want to find a Monitor that is BOTH white and big.
My first shot at this:
find(:all, :include => :features, :conditions => ["name IN
(''white'',
''big'')" )
But this query will find Monitors that''s EITHER white or big.
I can''t figure this out. Can anyone help at all?
Xin
--
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---