What would be the best way to model the following situation:
Word
belongs_to :wordable, :polymorphic => true
Phrase
has_many :words, :as => :workable
belongs_to :story
Line
has_many :words, :as => :wordable
belongs_to :story
Story
has_many :lines
has_many :phrases
has_many :words, :through => :phrases
has_many :words, :through => :lines
I want to be able to do
@story.words
to get list of all words that are linked to a story either via lines or via phrases...
Is that possible?
= nil if reload
is for? Thanks much. – Lives