Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bricesanchez opened this issue Aug 29, 2018 · 0 comments

Comments

@bricesanchez
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant