I'm having some trouble trying to render multiple nested objects in json.
Here's my script
def getFullSale
sale = Sale.find(params[:id])
render json: sale, include: [:discount_sale, :offer_sale, :mixed_payment, :product_sale => {:include => {:product_history => {include: :product}}}, :refunds => {include: :refund_products}]
end
This works until :product_sale, however anything after is ignored.
What I need is to include both :product_sale and :refund with nested properties.
Thanks!