aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-30 10:47:13 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-30 10:47:13 +0000
commitfd042ca3c96dcb454eddfdc423f68e233b2b3bab (patch)
tree6626d16cb9856fa3d104af86ee6409387883c20e /lib
parent2d3524808fa36a26f85ae85403d58f7114630c3e (diff)
Make better wording at the top of the page listing subsets of public bodies. At the same time, cause the tests not to rely on WDTK data. Fixes #396
Diffstat (limited to 'lib')
-rw-r--r--lib/public_body_categories.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/public_body_categories.rb b/lib/public_body_categories.rb
index 21a021d39..796b1d53d 100644
--- a/lib/public_body_categories.rb
+++ b/lib/public_body_categories.rb
@@ -20,7 +20,7 @@ class PublicBodyCategories
end
def PublicBodyCategories.get
- load_categories() if @@CATEGORIES.nil?
+ load_categories if @@CATEGORIES.empty?
@@CATEGORIES[I18n.locale.to_s] || @@CATEGORIES[I18n.default_locale.to_s] || PublicBodyCategories.new([])
end
@@ -30,10 +30,9 @@ class PublicBodyCategories
end
private
- @@CATEGORIES = nil
+ @@CATEGORIES = {}
def PublicBodyCategories.load_categories()
- @@CATEGORIES = {} if @@CATEGORIES.nil?
I18n.available_locales.each do |locale|
begin
load "public_body_categories_#{locale}.rb"
@@ -41,4 +40,4 @@ class PublicBodyCategories
end
end
end
-end \ No newline at end of file
+end