diff options
author | Matthew Lemon <y@yulqen.org> | 2024-11-11 16:33:24 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-11-11 16:33:24 +0000 |
commit | b8d7a7cf7e78fe384c6c6e8e6812a252084ce1f0 (patch) | |
tree | 5ef297ac23775afb1bcffb68265749d08f282297 /app/views/pdfresources/_pdfresource.json.jbuilder | |
parent | 97201e0bca203b6b303789374ffd7e4228e062a7 (diff) |
Adds first pdfresource model
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 |