...which of course doesn't work with "book.story.id =>..."
(-> "undefined local variable or method 'book'")
What's the correct query syntax for such a case (where I query across
the 2 tables 'Books' and 'Stories')?
The magic you are looking for is :include
Actually it's :joins. That's something of a misuse of :include.
The keys in the hash should be qualified column names (eg :conditions
=> {'stories.id' => @story_ids}).
:joins can either be an sql fragment or an association name (or array
or hash of those)