Thank you for the reply Simon. What you said worked for me, although I
did it in a rather inelegant way -- I'm not sure about the correct
syntax of my solution, but it works. It requires creating a string with
the ids in parens...
book_ids = "(100, 101, 102)"
chapters= Chapter.find(:all, :include => :books, :conditions =>
["books.id in #{book_ids} and chapter='2'"]
Any suggestions for clearer code welcome, but thank you for your help!
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---