diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/info_request.rb | 4 | ||||
-rw-r--r-- | app/models/public_body.rb | 4 | ||||
-rw-r--r-- | app/models/user.rb | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index da5270c40..2cf3a08b4 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -24,7 +24,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.202 2009-09-07 16:35:06 francis Exp $ +# $Id: info_request.rb,v 1.203 2009-09-07 17:31:38 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -154,7 +154,7 @@ public self.update_url_title end def update_url_title - url_title = MySociety::Format.simplify_url_part(self.title, 32) + url_title = MySociety::Format.simplify_url_part(self.title, 'request', 32) # For request with same title as others, add on arbitary numeric identifier unique_url_title = url_title suffix_num = 2 # as there's already one without numeric suffix diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 9362ecf20..8eb1b15b0 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -26,7 +26,7 @@ # 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.149 2009-08-26 00:45:38 francis Exp $ +# $Id: public_body.rb,v 1.150 2009-09-07 17:31:38 francis Exp $ require 'csv' require 'set' @@ -238,7 +238,7 @@ class PublicBody < ActiveRecord::Base self.update_url_name end def update_url_name - url_name = MySociety::Format.simplify_url_part(self.short_or_long_name) + url_name = MySociety::Format.simplify_url_part(self.short_or_long_name, 'body') write_attribute(:url_name, url_name) end # Return the short name if present, or else long name diff --git a/app/models/user.rb b/app/models/user.rb index f18a4e7ab..abf418ff4 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -23,7 +23,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user.rb,v 1.100 2009-08-27 15:44:23 francis Exp $ +# $Id: user.rb,v 1.101 2009-09-07 17:31:38 francis Exp $ require 'digest/sha1' @@ -153,7 +153,7 @@ class User < ActiveRecord::Base self.update_url_name end def update_url_name - url_name = MySociety::Format.simplify_url_part(self.name, 32) + url_name = MySociety::Format.simplify_url_part(self.name, 'user', 32) # For user with same name as others, add on arbitary numeric identifier unique_url_name = url_name suffix_num = 2 # as there's already one without numeric suffix |