Skip to content

Commit

Permalink
🐛 subject can't be blank for the contact form
Browse files Browse the repository at this point in the history
Previously there was a bug because even if you typed in a subject, the contact form would error saying that it was blank.

Part of issue:
- https://github.com/scientist-softserv/adventist-dl/issues/608
  • Loading branch information
ShanaLMoore committed Oct 4, 2023
1 parent 07fde57 commit 8ae51d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/hyrax/contact_form_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def create
# not spam, form is valid, and captcha is valid
@captcha.values[:category] = params[:contact_form][:category]
@captcha.values[:contact_method] = params[:contact_form][:contact_method]
@captcha.values[:subjects] = params[:contact_form][:subject]
@contact_form = model_class.new(@captcha.values)
if @contact_form.valid? && @captcha.valid?
ContactMailer.contact(@contact_form).deliver_now
Expand Down

0 comments on commit 8ae51d8

Please sign in to comment.