The model created by the has_many through relation would look like this:
class MerchantOrder < ActiveRecord::Base
belongs_to :order
belongs_to :user
has_many :products
end
But I am not sure if this is possible. Any reason why this wouldn't work?