Here's how my associations map:

class Journal < ActiveRecord::Base
 has_many :music_journal_entries
 has_many :film_journal_entries
end

class FilmJournalEntry < ActiveRecord::Base
 belongs_to :journal
end

class MusicJournalEntry < ActiveRecord::Base
 belongs_to :journal
end


Both "entries" tables have correct foreign keys set-up and contain
records that map correctly when querying their values through
Journal.

I just want to be able to pull in all of the film_journal_entries and
music_journal_entries buy running an AR query through Journal.

I have tried things like:
all_entries = Journal.all :joins =>
[:music_journal_entries, :film_journal_entries]
and some other things utilizing :include, but I still haven't got it.

How would I do this?
Thanks!!

Elliott G


-- 
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.

Reply via email to