json.extract! pdfresource, :id, :name, :stripe_product_id, :pdfs, :thumbnails, :price, :age_range, :curriculum, :feature_slot, :description, :card_description, :created_at, :updated_at json.url pdfresource_url(pdfresource, format: :json) json.pdfs do json.array!(pdfresource.pdfs) do |pdf| json.id pdf.id json.url url_for(pdf) end end json.thumbnails do json.array!(pdfresource.thumbnails) do |thumbnail| json.id thumbnail.id json.url url_for(thumbnail) end end