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.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index b95aa6c88..e27f2bb68 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -25,7 +25,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.138 2009-03-22 14:21:56 tony Exp $
+# $Id: public_body.rb,v 1.139 2009-04-02 15:33:11 francis Exp $
require 'csv'
require 'set'
@@ -464,6 +464,14 @@ class PublicBody < ActiveRecord::Base
return ret
end
+ def reverse_sorted_versions
+ self.versions.sort { |a,b| b.version <=> a.version }
+ end
+ def sorted_versions
+ self.versions.sort { |a,b| a.version <=> b.version }
+ end
+
+
end