I have three tables : Units, Offers and Agents with following associations
- Unit hasMany Offers
Offer belongsTo Agent
When I paginate Unit table I get all the units and all the corresponding Offers for each unit , but not the Agent that offer belongs to. Ex:
Unit1
offer1
offer2
Unit2
offer1
offer2
offer3
...
And I want to have something like this:
Unit1
offer1
agent1
offer2
agent2
Unit2
offer1
agent1
offer2
agent2
offer3
agent3
....
How to do it?