aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-10-27 00:55:50 +0300
committerFrancis Irving <francis@mysociety.org>2010-10-27 00:55:50 +0300
commite6562d170f3559997c4a48f15ceb054e4eb4a108 (patch)
tree9984f872a8e4ec1548c070a1b769f4d89bfd068b /app/models/info_request.rb
parentb9b6b4701ddc5ef1e306dc62867c2a68c9405599 (diff)
Stop people titling a request just "FOI request"
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 9c779c55c..23d7c78c3 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -100,6 +100,9 @@ class InfoRequest < ActiveRecord::Base
if !self.title.nil? && title.size > 200
errors.add(:title, '^Please keep the summary short, like in the subject of an email. You can use a phrase, rather than a full sentence.')
end
+ if !self.title.nil? && self.title =~ /^(FOI|Freedom of Information)\s*requests?$/i
+ errors.add(:title, '^Please describe more what the request is about in the subject. There is no need to say it is an FOI request, we add that on anyway.')
+ end
end
OLD_AGE_IN_DAYS = 21.days