diff --git a/app/forms/hyrax/pdf_form_behavior.rb b/app/forms/hyrax/pdf_form_behavior.rb index 1ed049e1..eba669ae 100644 --- a/app/forms/hyrax/pdf_form_behavior.rb +++ b/app/forms/hyrax/pdf_form_behavior.rb @@ -9,13 +9,18 @@ module PdfFormBehavior self.terms += %i[show_pdf_viewer show_pdf_download_button] self.hidden_terms = %i[show_pdf_viewer show_pdf_download_button] - # Not sure why this is needed but the form was not working without it - # it was getting a Unpermitted parameter error for these terms - permitted_params << %i[show_pdf_viewer show_pdf_download_button] end def hidden?(key) hidden_terms.include? key.to_sym end + + class_methods do + # Not sure why this is needed but the form was no working without it + # it was getting an Unpermitted paratemter error for these terms + def permitted_params + super + %i[show_pdf_viewer show_pdf_download_button] + end + end end end