aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-17 05:51:09 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-17 05:51:09 +1100
commitc092d975e63fb45190b78a123a94f8bf79f5e1e5 (patch)
treeeeed34c095475255c97b2cbb78531c835a490ca9
parent2c24664825dbda66659c1095ae547294bf27be3f (diff)
As much as possible use I18n.locale for getting the locale
-rw-r--r--app/models/public_body.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index cf1327c11..d59651a87 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -247,13 +247,13 @@ class PublicBody < ActiveRecord::Base
# When name or short name is changed, also change the url name
def short_name=(short_name)
- globalize.write(self.class.locale || I18n.locale, :short_name, short_name)
+ globalize.write(I18n.locale, :short_name, short_name)
self[:short_name] = short_name
self.update_url_name
end
def name=(name)
- globalize.write(self.class.locale || I18n.locale, :name, name)
+ globalize.write(I18n.locale, :name, name)
self[:name] = name
self.update_url_name
end