I would ditch the :through association here and have:

Milestone
  belongs_to :project
  has_many :tickets

Ticket
  belongs_to :project
  belongs_to :milestone

Project
  has_many :milestones
  has_many :tickets

This might seem like you're doubling up, but this best represents the
real world model.  A project has milestones and tickets can belong to
these milestones.  Tickets may also exist outside of milestones.

With your initial model, you'd need to create tickets in order to
create milestones - which is not correct.

Hope that makes sense!

Steve

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