I’ve got a table construction like this:
Mc Donalds emailed
Now i’ve created an join table presentationcontactstate with extra
fields like comment and date time. so i know for example when i called a
Now i want to get all the presentations that are in state emailed.
I now got in my contactstate model has_and_belongs_to_many
:presentation, :join_table => ‘presentationcontactstates’, :foreign_key
=> ‘fkcontactstateID’, :association_foreign_key => ‘fkpresentationID’
So with Contactstate.find(:all, conditions => ‘contactstate IN
(1,3,6)’).presentations i’ve got them. But now i want to filter those
results with for example city = ‘New York’
There i get stuck…
Does anyone know how to do this?
Thanks in advance.