From cc1430e476f6dcdb58d194bbb63d43a79ea1c457 Mon Sep 17 00:00:00 2001 From: francis Date: Thu, 8 May 2008 22:56:27 +0000 Subject: Strip spaces from titles. --- app/models/info_request.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/models/info_request.rb') diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 6b823c4b4..e1c75dd2a 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -21,7 +21,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.103 2008-05-08 12:24:31 francis Exp $ +# $Id: info_request.rb,v 1.104 2008-05-08 22:56:27 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -106,6 +106,11 @@ public end write_attribute(:url_title, unique_url_title) end + # Remove spaces from ends (for when used in emails etc.) + def title + title = read_attribute(:title) + kitle.strip + end # Email which public body should use to respond to request. This is in # the format PREFIXrequest-ID-HASH@DOMAIN. Here ID is the id of the -- cgit v1.2.3