presentation contactstate
Hilton new
Mc Donalds emailed
etc. called
visited
etc.
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
specific presentation.
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’