aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_body_categories.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-02-03 13:38:59 +0000
committerRobin Houston <robin.houston@gmail.com>2012-02-03 13:38:59 +0000
commit44bb96d40758f3b8bb9da20e3037ff2f04e81327 (patch)
tree2f43c9c02205fec1fb68cdcb66735d5b1ee3172f /lib/public_body_categories.rb
parent7ed887f0989425d9e412890800df05637b08c025 (diff)
parent14b5be69dc2dc3c4dd817feb0b5a8402fc343db4 (diff)
Merge branch 'release/0.5'
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