RE: One To Many To Many

You can’t as far as I know… (someone correct me if I’m wrong
please…)
But you can make it work.

Not tested but it’s similar to something I did before.

In the client model, do this

def line_items
    items = Array.new
    for order in self.orders
      items << order.line_items
  end
  items
  end

Then you can do client.find(1).line_items

If that makes you cry because of performance reasons, then you might
want to replace that logic with a simple select statement and use
find_by_sql