aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_body_categories.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-02-01 22:04:58 +0000
committerRobin Houston <robin.houston@gmail.com>2012-02-01 22:04:58 +0000
commitea04caec95cea132143997a1870ae8dd1fc0db5c (patch)
treef199e3f4187091a7a7c78f7fd6901529658174f7 /lib/public_body_categories.rb
parent59b5b15d56600ffc26d657dfea134ffcfc879725 (diff)
parenta76010c99459559a29901ed75b847384248c7c6e (diff)
Merge branch 'release/0.5' into develop
Diffstat (limited to 'lib/public_body_categories.rb')
-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