diff options
author | francis <francis> | 2008-09-25 12:58:04 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-25 12:58:04 +0000 |
commit | 41c069b9e43d20cca2057527d7ebd6cefe84670a (patch) | |
tree | 88c74e13cf0978a780b1103e215962f0e2438c61 | |
parent | b1c4d71e0ef8acba76475b8ecc84dcb1cd7b019a (diff) |
Sort tag searches on admin pages by name.
-rw-r--r-- | app/models/public_body.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index bc77126d1..4e17fa2a0 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.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: public_body.rb,v 1.108 2008-09-22 22:16:37 francis Exp $ +# $Id: public_body.rb,v 1.109 2008-09-25 12:58:04 francis Exp $ require 'csv' require 'set' @@ -222,7 +222,7 @@ class PublicBody < ActiveRecord::Base # Find all public bodies with a particular tag def self.find_by_tag(tag) - return PublicBodyTag.find(:all, :conditions => ['name = ?', tag] ).map { |t| t.public_body } + return PublicBodyTag.find(:all, :conditions => ['name = ?', tag] ).map { |t| t.public_body }.sort { |a,b| a.name <=> b.name } end # Use tags to describe what type of thing this is |