views:

14

answers:

0

Hi:

I have three models and not sure how to define the correct associations in Rails.

The relationships for three models are as following

TaskTemplate has many TaskLineItems TaskLineItems have order number (position of the item) TaskOrder belongs to TaskTemplate Task Order has one start task line item in the TaskTemplate it associated with Task Order has one end task line item in the TaskTemplate it associated with

What is the best way to present the above relationship in rails?

Thanks