From e6562d170f3559997c4a48f15ceb054e4eb4a108 Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Wed, 27 Oct 2010 00:55:50 +0300 Subject: Stop people titling a request just "FOI request" --- app/models/info_request.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/models/info_request.rb') 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 -- cgit v1.2.3