Sorry, I haven't seen the action that you post in the beginning

def who_bought
    @product = Product.find(params[:id] )
    respond_to do |format|
      format.html
      format.xml { render :xml => @product.to_xml( :include => :order )
}
      format.json {render :json => @product.to_json(:include => :order )
}
    end
  end


It should be @product.to_xml(:include => :orders)
Note the plural

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to