diff options
author | David Cabo <david@calibea.com> | 2011-09-03 15:00:41 +0200 |
---|---|---|
committer | David Cabo <david@calibea.com> | 2011-09-03 15:00:41 +0200 |
commit | aebe196100a231873099744ec33d1e4c7dc0934a (patch) | |
tree | 79ea3ea950e762d120bba34b7c1346db07bc513d /app/models/user.rb | |
parent | 1741094c4ff2f8592e5be5c09ee914f37b39039e (diff) | |
parent | 204e5c3a739a2bedf927b2f6aa82c373731bbda8 (diff) |
Merge branch 'develop' of github.com:sebbacon/alaveteli into develop
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index fddb6b035..c3c3da6f7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -96,6 +96,15 @@ class User < ActiveRecord::Base end end end + + def get_locale + if !self.locale.nil? + locale = self.locale + else + locale = I18n.locale + end + return locale.to_s + end def visible_comments self.comments.find(:all, :conditions => 'visible') |