diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-03-26 17:00:20 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-03-31 12:22:25 +0100 |
commit | 5d6d21f690e283682b9be74a8f00c501b148856f (patch) | |
tree | 09cb72ef2d8f62bec8bd7ce1fcae24c3b2633f5c /app/models | |
parent | b2acdc723ab7f56ca71f19ddcb571468dd5159ef (diff) |
Add honeypot spam protection to contact form
Intercepts the request and redirects to the homepage if the comment
field is filled in on the contact form.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/contact_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/contact_validator.rb b/app/models/contact_validator.rb index 65e539669..e9a6e491c 100644 --- a/app/models/contact_validator.rb +++ b/app/models/contact_validator.rb @@ -7,7 +7,7 @@ class ContactValidator include ActiveModel::Validations - attr_accessor :name, :email, :subject, :message + attr_accessor :name, :email, :subject, :message, :comment validates_presence_of :name, :message => N_("Please enter your name") validates_presence_of :email, :message => N_("Please enter your email address") |