diff options
Diffstat (limited to 'app/views/pdfresources/_pdfresource.json.jbuilder')
-rw-r--r-- | app/views/pdfresources/_pdfresource.json.jbuilder | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/views/pdfresources/_pdfresource.json.jbuilder b/app/views/pdfresources/_pdfresource.json.jbuilder new file mode 100644 index 0000000..6bb63a6 --- /dev/null +++ b/app/views/pdfresources/_pdfresource.json.jbuilder @@ -0,0 +1,14 @@ +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 |