aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-17 05:50:32 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-17 05:50:32 +1100
commit2c24664825dbda66659c1095ae547294bf27be3f (patch)
treec05b30e2413013cc3576076bd531b8393c2146bb
parent622790c63b53ee2da3c385460eb49dc32511fffc (diff)
Small refactor
-rw-r--r--app/models/user.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 6e1e21481..773e6db9d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -96,12 +96,7 @@ class User < ActiveRecord::Base
end
def get_locale
- if !self.locale.nil?
- locale = self.locale
- else
- locale = I18n.locale
- end
- return locale.to_s
+ (self.locale || I18n.locale).to_s
end
def visible_comments