Skip to content

Inquiry not saved when there are no recaptcha key and filter_spam set to false #178

@bricesanchez

Description

@bricesanchez

Step to reproduce:

  • Set config.filter_spam = false
  • Don't set any recaptcha key
  • Send an Inquiry
  • Check if the inquiry has been saved

If the bug is still present, the inquiry is not saved.

Hint:

if recaptcha?
if recaptcha_validated?
@valid = true
@inquiry.save
else
@inquiry.errors.add(:base, ::I18n.t(:captcha_invalid, scope: "refinery.inquiries.spam_filter"))
end
elsif simple_filter?
@inquiry.save
@valid = simple_filter_validated?
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions