diff options
author | Matthew Lemon <y@yulqen.org> | 2024-11-14 12:01:49 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-11-14 12:01:49 +0000 |
commit | 1b64b0b709c5704de48120e20bdfad32f34b0b5d (patch) | |
tree | 8cbb68c52a79d9cf12dfd861fee5fc3d0ac74b99 /app/controllers | |
parent | 06222c54c248a03d0b019db12bc365ab187e317a (diff) |
Adds credits and cleaner handling of page count using ruby
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/pdfresources_controller.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/pdfresources_controller.rb b/app/controllers/pdfresources_controller.rb index 4cd2d74..adacc64 100644 --- a/app/controllers/pdfresources_controller.rb +++ b/app/controllers/pdfresources_controller.rb @@ -68,7 +68,19 @@ class PdfresourcesController < ApplicationController # Only allow a list of trusted parameters through. def pdfresource_params - params.expect(pdfresource: [:name, :stripe_product_id, :price, :age_range, :curriculum, :feature_slot, :description, :card_description, pdfs: [], thumbnails: []]) + params.require(:pdfresource).permit( + :name, + :stripe_product_id, + :price, + :age_range, + :curriculum, + :feature_slot, + :description, + :card_description, + :credits, + pdfs: [], + thumbnails: [] + ) end # must be admin! |