aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/public_body.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/public_body.rb')
-rw-r--r--app/models/public_body.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index 99e7e4f57..e389d559f 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -24,12 +24,14 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: public_body.rb,v 1.123 2008-11-15 17:39:43 johncross Exp $
+# $Id: public_body.rb,v 1.124 2008-12-02 12:41:33 francis Exp $
require 'csv'
require 'set'
class PublicBody < ActiveRecord::Base
+ strip_attributes!
+
validates_presence_of :name
validates_presence_of :url_name
@@ -132,14 +134,6 @@ class PublicBody < ActiveRecord::Base
self.first_letter = self.name[0,1].upcase
end
- # Strip whitespace for everything, see http://railsforum.com/viewtopic.php?id=969
- before_save(:clean_whitespace)
- def clean_whitespace
- self.name = self.name.strip
- self.short_name = self.short_name.strip
- end
-
-
def validate
# Request_email can be blank, meaning we don't have details
if self.is_requestable?