aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-17 05:50:32 +1100
committerLouise Crow <louise.crow@gmail.com>2013-04-02 15:49:46 +0100
commitd7fe6deb9d573889274797039c8472bb40d08669 (patch)
treef9b79526ac14e00cb601205a8b752f3dfbe637f0
parentf6f1afd6d4d7908fd56173637fd7afbd76a8aba4 (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 e6c666e47..612ac7fa2 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -98,12 +98,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