diff options
author | francis <francis> | 2008-05-08 22:56:27 +0000 |
---|---|---|
committer | francis <francis> | 2008-05-08 22:56:27 +0000 |
commit | cc1430e476f6dcdb58d194bbb63d43a79ea1c457 (patch) | |
tree | 370df9f31048502f4a345ce25c75142ca8e2d0ba /app/models/info_request.rb | |
parent | daedcce37c2de48a7efd7ca4e46ea016bfbaf858 (diff) |
Strip spaces from titles.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 7 |
1 files changed, 6 insertions, 1 deletions
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 |