aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-17 05:51:09 +1100
committerLouise Crow <louise.crow@gmail.com>2013-04-02 15:50:11 +0100
commitf0b73deefec594c9cd35985f19b66cc3bb836788 (patch)
tree71e44593b4b98de663e0d5231b83bf4cd21dcfcf
parentd7fe6deb9d573889274797039c8472bb40d08669 (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 199440a28..b4d36fe91 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -240,13 +240,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